Replacing a subset of data in one column with text in another column.

DXZ08

New Member
Joined
Mar 24, 2008
Messages
12
Hi,
What would be the best way to handle this issue:

In a table, I have two columns with text data.
Column 1 is titled "Unit" and contains a selected text from a Form drop down which contains "OTHER" as one of the drop down choices.
Column 2 is titled "If OTHER, specify" and as you likely have guessed it already, contains free text entries ONLY for those rows that have "OTHER" in Column 1. Column 2 is otherwise blank for all other records.

To clean up the report I'm making and have the data only in one column instead of two, I'd like to move the free text from Column 2 into Column 1 via query but only for those records where Column 1 contains word "OTHER".
The query should still contain all of the original records, I'm not trying to filter it by those records.

Something along the lines of: Replace "OTHER" in Column 1 with text from Column 2 but only for those rows where Column 1 text = "OTHER". Leave the other Column 1 data untouched.

Thanks,
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Instead of rewriting the data, try biulding an expression to use in the report. Something like...
Code:
SelectedUnit:Iif([Field1]="Other",[Field2],[Field1])

Denis
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top