PhysiqologyInc
New Member
- Joined
- Sep 12, 2007
- Messages
- 16
I am trying to create the proper syntax to use the IF function for the following scenario. Cell B5 accepts a four-digit input value that I assign. This value is then broken up into four separate components in cells G5 to J5 using the VLOOKUP command to access a table I created on a separate sheet.
I need cell B6 to display the same value as B5, and cells G6 to J6 to display the components of B6, unless I decide that B6 needs to be assigned a different data point, in which case I need G6 to J6 to use the VLOOKUP function to break up the unique data entry point that I assigned and to display its components. Moreover, if there is no value assigned to B6, either because I did not assign a value to B5, or because I assigned a value to B5, but do not want to assign a value to B6 (and thus deleted the formula for B6), I need to make sure that G6 to J6 returns a null value, and remains blank.
My coding is:
B5 is assigned the value 4010.
G5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,2,0)), (" ")), which yields the value "4".
H5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,3,0)), ("")), which yields the value "0".
I5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,4,0)), ("")), which yields the value "1".
J5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,5,0)), ("")), which yields the value "0".
I have been trying to use the following formula for B6: =IF($B5>0, (B5), (" "))
That formula works for B6 itself, but causes an error for cells G6 to J6 (#N/A), which all use the same formulas as above, but reference $B6, rather than $B5. My syntax obviously messes up the VLOOKUP command of those cells, but I have no idea what or why. Any help is always appreciated.
I need cell B6 to display the same value as B5, and cells G6 to J6 to display the components of B6, unless I decide that B6 needs to be assigned a different data point, in which case I need G6 to J6 to use the VLOOKUP function to break up the unique data entry point that I assigned and to display its components. Moreover, if there is no value assigned to B6, either because I did not assign a value to B5, or because I assigned a value to B5, but do not want to assign a value to B6 (and thus deleted the formula for B6), I need to make sure that G6 to J6 returns a null value, and remains blank.
My coding is:
B5 is assigned the value 4010.
G5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,2,0)), (" ")), which yields the value "4".
H5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,3,0)), ("")), which yields the value "0".
I5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,4,0)), ("")), which yields the value "1".
J5 is =IF($B5>0, (VLOOKUP($B5,Tempos!$A$2:$E$103,5,0)), ("")), which yields the value "0".
I have been trying to use the following formula for B6: =IF($B5>0, (B5), (" "))
That formula works for B6 itself, but causes an error for cells G6 to J6 (#N/A), which all use the same formulas as above, but reference $B6, rather than $B5. My syntax obviously messes up the VLOOKUP command of those cells, but I have no idea what or why. Any help is always appreciated.