Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm getting the wrong values out of the following formula.
The variable to plug in a E16 == 40000 B32 == 5000 The IF statement is: =IF(E16 B32 & E16 60000, 30000, E16-B32) It should give, from left to right: E16 B32 returns TRUE But B32 is not 60000 so it returns FALSE So Result is not 30000 but E16 - B32 which is 35000 but I get 30000 I'm clearly handling the & wrongly. Would someone be kind enough to put me straight? TIA Alan Secker |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
your critieria returns a string
TrueTrue or FalseTrue or TrueFalse and is done with the And function IF(And(E16 B32,E16 60000), 30000, E16-B32) -- Regards, Tom Ogilvy "Alan Secker" wrote in message ... I'm getting the wrong values out of the following formula. The variable to plug in a E16 == 40000 B32 == 5000 The IF statement is: =IF(E16 B32 & E16 60000, 30000, E16-B32) It should give, from left to right: E16 B32 returns TRUE But B32 is not 60000 so it returns FALSE So Result is not 30000 but E16 - B32 which is 35000 but I get 30000 I'm clearly handling the & wrongly. Would someone be kind enough to put me straight? TIA Alan Secker |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you need to change the "&" to the word AND.
B32 & E16 will concatenate to 500040000 cheers, Matt. "Alan Secker" wrote in message ... I'm getting the wrong values out of the following formula. The variable to plug in a E16 == 40000 B32 == 5000 The IF statement is: =IF(E16 B32 & E16 60000, 30000, E16-B32) It should give, from left to right: E16 B32 returns TRUE But B32 is not 60000 so it returns FALSE So Result is not 30000 but E16 - B32 which is 35000 but I get 30000 I'm clearly handling the & wrongly. Would someone be kind enough to put me straight? TIA Alan Secker |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Matt. Alan
Matt. wrote: I think you need to change the "&" to the word AND. B32 & E16 will concatenate to 500040000 cheers, Matt. "Alan Secker" wrote in message ... I'm getting the wrong values out of the following formula. The variable to plug in a E16 == 40000 B32 == 5000 The IF statement is: =IF(E16 B32 & E16 60000, 30000, E16-B32) It should give, from left to right: E16 B32 returns TRUE But B32 is not 60000 so it returns FALSE So Result is not 30000 but E16 - B32 which is 35000 but I get 30000 I'm clearly handling the & wrongly. Would someone be kind enough to put me straight? TIA Alan Secker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula returns error; abbreviating the formula | Excel Discussion (Misc queries) | |||
error with formula | New Users to Excel | |||
Formula Error | Excel Worksheet Functions | |||
Error in Formula | Excel Discussion (Misc queries) | |||
How do I replace "#N/A" error, to continue my formula w/o error? | Excel Worksheet Functions |