Power Query If Col A and Col B = Null

themissingelf

New Member
Joined
Nov 20, 2013
Messages
11
Hi,

I think what I am trying to do is simple but the solution is evading me right now...

I simply want to a Power Query statement to do the following in a new column but can't work out what the formula should be:

IF COL A = NULL AND COL B = NULL THEN "OK" ELSE "NOT OK"

Grateful for help!

Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
=IF([COL A]=NULL,if([COL B ]= NULL ,"OK","NOT OK"),"NOT OK") Probably not the most elegant one but should help
 
Upvote 0
Hi,
Thank you - I've not tried this before; however, when I do I'm getting an error: "Token RightParen Expected". When I click "Show Error" it highlights the comma shown in red below
=IF([COL A]=NULL,if([COL B ]= NULL ,"OK","NOT OK"),"NOT OK")
 
Upvote 0
What Olivier said, except enclose the if condition in parentheses: if ([COL A] = null and [COL B] = null) then "OK" else "NOT OK"
 
Upvote 0

Forum statistics

Threads
1,225,653
Messages
6,186,200
Members
453,340
Latest member
yearego021

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