convert Excel Formula If statement into Power Query

Sian1

Board Regular
Joined
Nov 9, 2009
Messages
90
Hi, could someone please help to convert excel if statement formula to Power Query

=IF(AND(BF2<>"",BG2<>""),"Issued/Booked",IF(AND(BN2="",BK2<>"PO Direct"),"Not Released",IF(AND(BQ2="",BK2="PO Direct"),"Not Released",IF(AND(CC2="Rejected",S2="NP Practice - Rejected",BO2>BR2),"Rejected by NPP",IF(OR(CC2="Rejected",CC2="Rejected - Pending Acceptance"),"Rejected by NP",IF(CC2="New - Pending Acceptance","Released to NP",IF(CC2="New - New Pending Client / Broker Review","Pending",IF(AND(R2="New-Working",S2="NP Practice - Rejected"),"Rejected",IF(AND(R2="New-Working",S2="NP Practice - Accepted"),"Released to NP",IF(AND(R2="New-Working",OR(S2="NP Practice - Pending",S2="NP Practice - Completed")),"Released to NPP",IF(OR(R2="Open-Released",R2="Open-Corrected"),"Released to Booking",IF(OR(R2="Open-Released/Pending Info",R2="Open-Corrected/Pending Info"),"Pending",IF(R2="Open-Rejected","Rejected",IF(R2="Open-Accepted","Accepted Booking",IF(R2="Open-LclBooked","Booked, Unissued",0)))))))))))))))
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Wow, ... I would suggest to make a mapping table. Then use a merge table on multiple columns. Expand the result column.

Basically one could add a conditional column in PQ and make this headache formula.
Syntax is if then else, and/or as key words.
 
Upvote 0
hahaha, i know right.
I tried to use the Syntax like you said if then else with and/or and no syntax detect error message
however the results didn't come to what expectation however excel does so i don't know what i have done wrong
 
Upvote 0
In PQ, the syntax is If-->then else if-->then else if-->then...............else but that makes for a long convoluted statement. As G indicated, you may be better off doing some mapping. If you upload your file to a third party site and provide a detailed description of what you are trying to do, it may be more beneficial than trying to reverse engineer a long convoluted if then statement.
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,980
Members
452,540
Latest member
haasro02

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