Move Data to the Correct Excel Column Based on a Cell Value
Question details
Place each row's value in the destination column that matches its item type.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains item types and associated values that need to be distributed into separate columns.
- Observed behavior
- Each value appears under its matching item-type header, while unrelated destination cells appear blank.
Identify the item-type and value columns, and create destination headers that match the item types exactly. The example below uses column A for types, column B for values, and row 1 for destination headers.
Use an IF Formula to Match Values to Column Headers
Use this formula when destination headers contain the item types and you want results to update automatically.
In Excel, enter item types such as Tree and Flower in cells C1 and D1, matching the type names in column A.
Select C2 and enter =IF($A2=C$1,$B2,""). Press Enter to display the value from B2 only if A2 matches the header in C1.
Select C2 and drag its fill handle across the destination columns and down through the data rows. Each formula compares the row's type with its column header.
Review the destination columns to confirm that each value appears under its matching header and that other cells appear blank.

Distribute Values by Item Type in WPS Spreadsheet
Use the same IF formula in WPS Spreadsheet to place values under matching headers and update the results when source data changes.
- 1. Open the worksheet: Open WPS Spreadsheet and choose Open to select your Excel workbook.
- 2. Set up the headers: With item types in column A and values in column B, enter matching item-type headers in C1, D1, and any additional destination columns.
- 3. Enter the IF formula: Select C2, type =IF($A2=C$1,$B2,""), and press Enter.
- 4. Fill the destination range: Drag the fill handle from C2 across the destination columns and down to the last data row.

Frequently Asked Questions
What if my type and value are in different columns?
Change $A2 and $B2 in the formula to your type and value columns. Keep the dollar sign before each column letter so those references stay fixed when you fill across.
Why is a value missing from its destination column?
Check that the item type in column A matches the destination header and that the value cell in column B is not empty. Extra spaces in a type or header can prevent a match.
Does the formula remove the original value?
No. The IF formula displays the value in the matching destination cell, but the original remains in the source column.
How can I keep the results without formulas?
Select and copy the destination range, then use Paste Special and choose Values. The pasted results will no longer update when the source data changes.




