supertemp123
New Member
- Joined
- Jan 17, 2013
- Messages
- 3
Hi,
In Excel 2010, I am trying to create a calculator to do the following:
Compare one date ("control date") to a list of dates ("list dates") and determine which date from that list is the first one to occur after the date in question (i.e. the last "greater than" date when looking at a descending list of dates).
The "list dates" are generally one date a year, but not always.
I have tried:
I am not having luck with ".End(xlup)" -- is this how I should approach this -- I don't want last cell with any value, but last cell with a particular value (i.e. greater than 0/Positive/True)? I am not a VB expert, but could, in a pinch, perhaps get it to work.
In Excel 2010, I am trying to create a calculator to do the following:
Compare one date ("control date") to a list of dates ("list dates") and determine which date from that list is the first one to occur after the date in question (i.e. the last "greater than" date when looking at a descending list of dates).
The "list dates" are generally one date a year, but not always.
I have tried:
- Subtracting the "list dates" from the "control dates" and copying that formula down until I hit a negative number.
- This brings up the negative dates problem, however, and I can't change my workbook to the 1904 dates, since the actual dates will be recorded on a worksheet that will later be printed (a "written record" of the calculation). For these last cell formulas, can it just look for the last "valid" cell (i.e. not #NUM!)?
- Using an IF statement to designate those dates that are GREATER THAN the "control date" (and setting TRUE to "1" and FALSE to "0") and noting where these become 0/False.
- I see the last cell before it becomes "0", but how do I record it in another cell?
I am not having luck with ".End(xlup)" -- is this how I should approach this -- I don't want last cell with any value, but last cell with a particular value (i.e. greater than 0/Positive/True)? I am not a VB expert, but could, in a pinch, perhaps get it to work.