Continuing this topic, I would like to add one more condition. I have the following start
, end
, and action
columns:
11/9/2007 10/10/2008 SELL
11/14/2008 5/29/2009 BUY
11/27/2009 2/5/2010 SELL
10/8/2010 4/8/2011 SELL
I also have target
days (ex-weekends) starting from April 1, 2007 to today. I would like to do the following:
- If the
target
day is in the range ofstart
andend
dates ANDaction
isSELL
, then print out-1
; - If the
target
day is in the range ofstart
andend
dates ANDaction
isBUY
, then print out1
; - If the
target
day is not in the range ofstart
andend
dates, then print out0
;
Any guidance/tips appreciated as always.
See Question&Answers more detail:os