Vba Vlookup And Return Row NumberJun 9, 2009
I am trying to create a macro and I need it to return the row # based on a vlookup of a date and not 100% sure how to do that.. Hoping to get a little assistance.
I am looking up a date in column A, and need it to return the row #, then I can do the rest of the macro I need. The date I need to look up varies, and is based on the following function I have in a cell elsewhere, but if there is an easier way in vba to write i'm open:
which basically says if it's monday lookup the date from 3 days ago (friday), otherwise look up yesterday's date. So today it returns 6/8/09 and I need to find the row that has 6/8/09 as the value in column A.
Now the dates in column a, are all formulas that say previous row's date + 1, so the only row that has the actual date in it is the very first one, then we just add a day. Not sure if that matters, but figured I'd give all info.