T
TRAVEL489
I have 4 columns / cells:
A1 = current price
B2 = low price
C3 = high price
D4 = Action to Take
I am trying to use the IF function to automatically
determine and print the action to take in D4 depending on
the following:
IF A1 is less than B2, then BUY appeears in D4
IF A1 is between B2 and C3, then HOLD appears in D4
IF A1 is higher than C3, then SELL appears in D4
I am using the following formula in the formula bar
without success, any suggestions?
=IF(A1<B2,"BUY","",(B2<A1<C3,"HOLD","",(A1>C3,"SELL","")))
If I don't include the middle IF determination
{B2<A1<C3,"HOLD","",}, it works just fine. That is, BUY
or SELL appear in D4 depending on the value in A1 and its
relationship to B2 or C3.
The problem comes when trying to also determine if the
current price A1 lies between the low price B2 and the
high price C3. In that case, a #value error message
appears in D4.
Any advice would be greatly appreciated.
A1 = current price
B2 = low price
C3 = high price
D4 = Action to Take
I am trying to use the IF function to automatically
determine and print the action to take in D4 depending on
the following:
IF A1 is less than B2, then BUY appeears in D4
IF A1 is between B2 and C3, then HOLD appears in D4
IF A1 is higher than C3, then SELL appears in D4
I am using the following formula in the formula bar
without success, any suggestions?
=IF(A1<B2,"BUY","",(B2<A1<C3,"HOLD","",(A1>C3,"SELL","")))
If I don't include the middle IF determination
{B2<A1<C3,"HOLD","",}, it works just fine. That is, BUY
or SELL appear in D4 depending on the value in A1 and its
relationship to B2 or C3.
The problem comes when trying to also determine if the
current price A1 lies between the low price B2 and the
high price C3. In that case, a #value error message
appears in D4.
Any advice would be greatly appreciated.