Power Query, If merged Column has null value Concatenate Col [B] space Col [J]

ddander54

Board Regular
Joined
Oct 18, 2012
Messages
97
Wondering if you can point me in the right direction? I have a 16k row Query (Query1) in PQ that I have merged an 88 row table (Table1) to add 1 additional column to the Query. In the new column in the Query there are some null values where the Merge didn't find the match. Where there is a null value in that new column I would like to 'Concatenate' the value in that row from 'ColB' sp 'ColJ' (underscore would be ok to replace sp if needed).
Existing Query1:
ColA.......ColB.......ColJ......New Column
1...............ABC........DEF......MATCH
2...............GHI.........EFG......null
3...............QRS........XYZ......null

Want Query1:
ColA.......ColB.......ColJ......New Column
1...............ABC........DEF......MATCH
2...............GHI.........EFG......GHI EFG
3...............QRS........XYZ......QRS XYZ

Hope that makes sense.

TIA

Don
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I would change the null values in "New Column" to "NO MATCH", using Replace Values.
Then, use "Add Column" to combine ColB with ColJ, using space as the delimiter. Call it "COMBINED" (or whatever you please).

Then, create a Conditional Column called "FINAL RESULT":
If New Column = "MATCH" then "MATCH" else if "NO MATCH" then "COMBINED".

Then you can delete the helper columns (COMBINED & New Column)

There is probably a more efficient way that can save a step or two, but this should get it done.
 
Upvote 0
Solution
Thank you for your guidance....sometimes I get stuck looking for the one step process, that could be available and forget that there is always more than one way to do things in Excel. It's that 'can't see the trees for the forest' thing.

Thx,
Don
 
Upvote 0

Forum statistics

Threads
1,223,635
Messages
6,173,479
Members
452,516
Latest member
archcalx

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