question

AllanWilliams-3071 avatar image
0 Votes"
AllanWilliams-3071 asked AllanWilliams-3071 commented

I wish to write a macro to search a column of mixed data, find dates, and compare to "today".

I wish to write a macro to search a column of mixed data, find dates, and compare to "today". If less, find next, if more, short scroll up (3) and select rows 1 to "current" and delete.

office-vba-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In Excel, I have created a column with Zeros to represent "non date" cells so that they are not recognized as greater than the dates. Now I wish to write a procedure to start at row 3 end work progressively down, checking the values against the Row1 value, which is "Today". If less than "Today" check the next etc. until it finds the first value greater than "Today". I would then wish to select all rows, including "current" and row 3 and "delete. If necessary, rows could be deleted sequentially as individuals because as each is deleted the next row up now meets the criteria. A provision would need to be in place to stop this process before it deleted Row 2.

0 Votes 0 ·

0 Answers