DRSteele
Well-known Member
- Joined
- Mar 31, 2015
- Messages
- 2,640
- Office Version
- 365
- Platform
- Windows
Can someone please help me write an IF statement in PQ?
I have the following output (Columns A to G) from a query in a spreadsheet and two formulas (Columns I and J) that depend on that data. I would rather have the formulas in new, calculated columns in PQ but I can't seem to figure out the syntax to write If.Then:Else statements.
I have the following output (Columns A to G) from a query in a spreadsheet and two formulas (Columns I and J) that depend on that data. I would rather have the formulas in new, calculated columns in PQ but I can't seem to figure out the syntax to write If.Then:Else statements.
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
3 | Date | Visitor | VisScr | Host | HstScr | Result | TotScr | VisPts | HstPts | |||
4 | 10/7/2015 | Vancouver Canucks | 5 | Calgary Flames | 1 | R | 6 | 2 | 0 | |||
Sheet4 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
I4 | =IF(C4>E4,2,IF(OR(C4>E4,F4="S/O",F4="OT"),1,0)) | |
J4 | =IF(C4OR(C4),1,0)) |
Last edited: