gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 673
- Office Version
- 2019
- Platform
- Windows
Hello,
Im using the following nested IF's, but get #VALUE! as a result.
If I use a single IF by itself, I get the correct value.
Im looking for whether the row is odd or even, then do the vlookup according to the Row and the $B4 values which results to different columns.
IF(AND(MOD(ROW(),2)=0,$B5>=1),VLOOKUP($A5,$IL$6:$IO$35,4,0),VLOOKUP($A5,$GS$6:$GV$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-1,$B5>=-4.5),VLOOKUP($A5,$IA$6:$ID$35,4,0),VLOOKUP($A5,$GH$6:$GK$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-5,$B5>=-9.5),VLOOKUP($A5,$HP$6:$HS$35,4,0),VLOOKUP($A5,$FW$6:$FZ$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-10),VLOOKUP($A5,$HE$6:$HH$35,4,0),VLOOKUP($A5,$FL$6:$FO$35,4,0))
Thank you
Im using the following nested IF's, but get #VALUE! as a result.
If I use a single IF by itself, I get the correct value.
Im looking for whether the row is odd or even, then do the vlookup according to the Row and the $B4 values which results to different columns.
IF(AND(MOD(ROW(),2)=0,$B5>=1),VLOOKUP($A5,$IL$6:$IO$35,4,0),VLOOKUP($A5,$GS$6:$GV$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-1,$B5>=-4.5),VLOOKUP($A5,$IA$6:$ID$35,4,0),VLOOKUP($A5,$GH$6:$GK$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-5,$B5>=-9.5),VLOOKUP($A5,$HP$6:$HS$35,4,0),VLOOKUP($A5,$FW$6:$FZ$35,4,0)),IF(AND(MOD(ROW(),2)=0,$B5<=-10),VLOOKUP($A5,$HE$6:$HH$35,4,0),VLOOKUP($A5,$FL$6:$FO$35,4,0))
Thank you