Hi everyone.
I am stuck trying to figure out a macro. Basically, I have a column of dates with details a few columns away. When I run the macro, I want it to
search for the closest (past) date with reference to the date when the macro was run.
For example, today is March 21, 2013, and I have March 1, 5, 10, 18, 22, 26 in the column of dates. When I run the macro I want it to generate the data from March 18 (being the closest date). Like the amount to the right of March 18. Afterwards, it would just move to the next worksheet and process the same set of commands. (the details will be shown on the first sheet, while the 2nd sheet until the nth sheet will contain all the data).
I have an ideas with the min function, where I'll subtract the column of dates to the date today, then see which one has the smallest positive (or negative) number. I have no idea how to actually translate this into code :| Please help!
P.S. The date isn't limited to just a month. It could be as long as 6 months or so. (not more than a year I think)
Bookmarks