Formula Errors

How to Create an Excel Inventory Formula with Unit and Case Drop-Down Lists

Rana GarciaRana Garcia Oct 29, 2026 870 views

Question details

The user wants to set up an inventory worksheet with a drop-down list to select between 'each' and 'case', dynamically calculate the unit price, and multiply it by the quantity.

How to Create an Excel Inventory Formula with Unit and Case Drop-Down Lists
Product
Excel
Device & OS
not provided
Scenario
Building an inventory management spreadsheet with dynamic pricing based on unit types (each vs. case).
Observed behavior
Needs formulas to correctly calculate the unit price depending on the drop-down selection and then compute the total inventory value.
Before you start

Ensure your inventory data is organized in columns: Product Name, Units per Case, Case Price, Unit Selection (drop-down), Quantity, Calculated Price, and Total Value.

Solution 1Recommended

Use Data Validation and the IFS Function for Dynamic Pricing

Create a drop-down list using Data Validation and calculate the price automatically using the IFS function to handle 'case' and 'each' conditions.

This method relies on maintaining consistent data layout. By setting up a drop-down list, you eliminate data entry errors, and the IFS function smoothly toggles the math depending on the unit type selected.

1
Create the drop-down list

Select the cell for unit selection (e.g., F2). Go to the Data tab, click Data Validation, choose 'List' under the Allow settings, and enter 'each,case' in the Source field.

2
Calculate the unit price

Assuming E2 is the case price, C2 is units per case, and F2 is the drop-down, enter the formula '=IFS(F2="case",C2*E2, F2="each", E2/C2)' into your Calculated Price column (e.g., G2).

3
Calculate total inventory value

To find the total value based on the entered quantity in H2, enter the formula '=IF(H2="","Please enter a value in the quantity field.", G2*H2)' in the total value column.

Use Data Validation and the IFS Function for Dynamic Pricing
Tip: Drag the fill handle at the bottom right corner of your formula cells down to apply these calculations to all items in your inventory worksheet.
Efficient Spreadsheet Tool

Build Your Inventory Trackers in WPS Office

WPS Spreadsheet fully supports data validation, IFS, and VLOOKUP functions, making it incredibly easy to set up dynamic inventory trackers and perform complex unit calculations effortlessly.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your inventory document or create a new blank workbook.
  2. 2. Apply Data Validation: Highlight the target cells and navigate to the Data tab. Select Data Validation to create your 'case,each' drop-down list.
  3. 3. Enter Calculations: Type the =IFS(...) and =IF(...) formulas in your pricing and total columns to instantly calculate the dynamic costs.
  4. 4. Fill Formulas: Drag the fill handle down to copy the dynamic formulas across your entire inventory database.
100% compatible with Microsoft Excel formulas (.xlsx)Fully supports advanced functions like IFS, XLOOKUP, and VLOOKUPBuilt-in customizable templates for quick inventory managementFree and lightweight alternative to heavy spreadsheet apps
microsoft office alternative - wps office

Frequently Asked Questions

Why is my IFS formula returning a #NAME? error?

This happens if you are using an older version of Excel (like Excel 2016 or earlier) that does not support the IFS function. You can achieve the same result by nesting multiple IF functions, such as: =IF(F2="case", C2*E2, IF(F2="each", E2/C2, "")).

How do I create a drop-down list for 'each' and 'case'?

Select the cell where you want the drop-down. Go to the Data tab on the ribbon, choose Data Validation, change the 'Allow' setting to 'List', and type 'each,case' in the Source text box. Click OK.

Can I hide the #N/A error if the drop-down is left blank?

Yes. You can wrap your entire formula in the IFERROR function. For example: =IFERROR(IFS(F2="case",C2*E2,F2="each",E2/C2), "Please select a unit"). This will display a friendly message instead of an error code.