Function Problems

Map PVC Socket Sizes in Excel with IFS, SWITCH, or XLOOKUP

Jason MillerJason Miller Dec 2, 2026 869 views

Question details

Return a corresponding value for each PVC socket size in an Excel worksheet.

Map PVC Socket Sizes in Excel with IFS, SWITCH, or XLOOKUP
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains multiple PVC socket sizes that need to be mapped to specific values.
Observed behavior
An IFS formula needs a complete condition and result pair for each size to return the intended value.
Before you start

Check how socket sizes are stored in the worksheet, including spaces and units, and decide which value each size should return. The examples use text sizes and illustrative values, not PVC specifications; replace them with your actual mappings.

Solution 1Recommended

Use complete IFS pairs for each socket size

Use IFS when you want to list each size and its result directly in one formula.

1
Enter a socket size

Enter a text size such as 1/2 in in cell A2. Make sure the text matches the size used in the formula.

2
Enter the IFS formula

In B2, enter =IFS(A2="1/2 in",10,A2="3/4 in",15,A2="1 in",20,TRUE,"Not found"). Each condition is followed by its result; the final TRUE pair handles unmatched sizes.

3
Apply your mappings

Replace the example sizes and numbers with your own, then drag B2's fill handle down to apply the formula to other rows.

Use complete IFS pairs for each socket size
Check regional separators: If Excel rejects the formula, use the list separator required by your regional settings, such as semicolons instead of commas. Use your regional decimal separator for decimal values.
Map sizes in WPS Spreadsheets

Map PVC Socket Sizes with WPS Spreadsheets

Use a nested IF formula in WPS Spreadsheets to return a value for each socket size, then save the workbook in Excel format.

  1. 1. Open the workbook: Open WPS Office, select Spreadsheets, and open your workbook or create a new one.
  2. 2. Enter a socket size: Enter a text size such as 1/2 in in cell A2. Replace the example with the size format used in your worksheet.
  3. 3. Add the mapping formula: In B2, enter =IF(A2="1/2 in",10,IF(A2="3/4 in",15,IF(A2="1 in",20,"Not found"))). Replace the example sizes and results with your actual mappings.
  4. 4. Fill and save: Drag B2's fill handle down for the remaining rows, then use File > Save As to save the workbook as an XLSX file.
Map socket sizes to your own values with a nested IF formulaOpen and save Microsoft Excel XLSX workbooksUse a familiar spreadsheet interface to fill formulas down
microsoft office alternative - wps office

Frequently Asked Questions

Why does my IFS formula return an argument error?

IFS requires a result after every condition. Check the formula in the formula bar to ensure each condition has a matching result, including any final TRUE condition.

How can I show a message when a socket size is not listed?

Add TRUE,"Not found" as the final IFS pair, use "Not found" as the final SWITCH argument, or enter it as XLOOKUP's fourth argument.

Why does my socket size not match the lookup table?

Check the source cell and lookup table for differences in spaces, units, or whether the size is stored as text or a number. The examples require text such as 1/2 in to match the table entry.

What if Excel rejects the commas in my formula?

Your regional settings may require semicolons as formula argument separators. Replace the commas between arguments with semicolons and use the appropriate decimal separator for any decimal values.

Can I use XLOOKUP in Excel 2019?

No. XLOOKUP is not available in Excel 2019. Use IFS or SWITCH for a short list of mappings, or use another supported lookup function with a table.