hello
I am having a problem using nested IFs.
The problem occurs on the last IF where the MATCH is.
I have tested each if separately and they all work as expected but when i try to group them, i get the error "The formula you typed contains an error:" and it points to this.
IF(AND($G4="2D",$F4="Qtr"),sum((VLOOKUP($C4,'Economy Variance'!$D$4:$P$10,MATCH($F4,'Economy Variance'!$E$3:$P$3)+1,FALSE))*$E4)
Is there something missing that woudl cause the error?
any help appreciated
I am having a problem using nested IFs.
The problem occurs on the last IF where the MATCH is.
I have tested each if separately and they all work as expected but when i try to group them, i get the error "The formula you typed contains an error:" and it points to this.
IF(AND($G4="2D",$F4="Qtr"),sum((VLOOKUP($C4,'Economy Variance'!$D$4:$P$10,MATCH($F4,'Economy Variance'!$E$3:$P$3)+1,FALSE))*$E4)
Is there something missing that woudl cause the error?
any help appreciated
Code:
=IF(AND($G4="ND",$F4="Full"),VLOOKUP($C4,'Next Day Variance'!$D$4:$P$10,MATCH($E4,'Next Day Variance'!$E$3:$P$3)+1,FALSE),
IF(AND($G4="ND",$F4="Half"),sum((VLOOKUP($C4,'Next Day Variance'!$D$4:$P$10,MATCH($F4,'Next Day Variance'!$E$3:$P$3)+1,FALSE))*$E4),
IF(AND($G4="ND",$F4="Qtr"),sum((VLOOKUP($C4,'Next Day Variance'!$D$4:$P$10,MATCH($F4,'Next Day Variance'!$E$3:$P$3)+1,FALSE))*$E4),
IF(AND($G4="2D",$F4="Full"),VLOOKUP($C4,'Economy Variance'!$D$4:$P$10,MATCH($E4,'Economy Variance'!$E$3:$P$3)+1,FALSE),
IF(AND($G4="2D",$F4="Half"),sum((VLOOKUP($C4,'Economy Variance'!$D$4:$P$10,MATCH($F4,'Economy Variance'!$E$3:$P$3)+1,FALSE))*$E4),
IF(AND($G4="2D",$F4="Qtr"),sum((VLOOKUP($C4,'Economy Variance'!$D$4:$P$10,MATCH($F4,'Economy Variance'!$E$3:$P$3)+1,FALSE))*$E4),"NOT FOUND"))))))