![]() |
IF with #VALUE! ERROR
Hi, everybody
I like to make a stop loss calculator for my stock positions using the interval low prices. Characters: Yesterday High = B17 Yesterday Low = B18 Yesterday Stop Loss = B19 Today High = C17 Today Low = C18 Today Stop Loss = ? The amount I let the stock play with = A14 Here is the rule: I have a stop loss price in B19 from yesterday. If the today low is lower than B19 (stop loss), than the broker sold my position, end of story. C18<B19 = OUT (If possible with red fill color and white font color) If today low C18 is higher than yesterday stop loss B19 but lower or equal than yesterday low B18 : I like to use (hold) yesterday stop loss. B19<C18<=B18 = B19 If today low C18 is higher than yesterday low B18 than I like to use a new stop loss (today stop loss) C18-$A$14 My calculation was C19 =IF(C18<=B18,B19,IF((C18-$A$4)<=B19,B19,C18-$A$4)) C20 =IF(C18<B19,"OUT",IF(C19B19,C19,B19)) But when B19<C18<=B18 than I have an #VALUE! error -- Many thanks for your help in advance. Have a wonderful day! Zsolt |
All times are GMT +1. The time now is 01:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com