Combining function

Hi all, absolute newbie here. I’ve been messing about with calc for a while now and I’m still learning. Help would be appreciated to combine two functions listed below:

=IF(OR(F3="HL",F3="AL"),I3*-1,I3)
combined with:

=IF((F3="HW")+(F3="AW"),CY3)

Any help would be appreciated and if it could be simplified that would be welcome too.

Thanks,

Markmu66

You could try:
=IF(OR(F3="HL",F3="AL"),I3*-1,IF((F3="HW")+(F3="AW"),CY3),I3)

Thanks Steph1 but it’s returning error 504.

Because the first IF() gets 4 arguments passed, which is wrong and can be seen with the Function Wizard (Ctrl+F2 on formula) and stepping through with the Next button. Probably instead should had been

=IF(OR(F3="HL";F3="AL");I3*-1;IF((F3="HW")+(F3="AW");CY3;I3))

(note to @Steph1: please use the ; semicolon function separator here in examples, as that works in all setups regardless of localization).

1 Like

Thank you erAck, worked a treat.

1 Like