I need a macro that can do the following:
First: I am looking for a macro that will delete every row (11-1000) that has a value in G column that is greater than the value in cell (M2). For example if (G11) had a value of 16 and (G12) had a value of 50 and cell (M2) had a value of 40 then row 12 would be deleted because 50 is greater than 40 and row 11 would not be deleted.
Secondly: I need the macro to do the same search as above but for column F rows (1-1000) and I need to compare each value in column F rows (11-1000) to cell (K2). I am comparing cars. I need the values in Column F to not be older than 15 years of the year in (K2). It can be younger, just not older than 15 years. For example, if cell F11 had a year of 1955 and cell F12 had a year of 1999 and cell K2 had a year of 2000 then row 11 would be deleted because 1955 is more than 15 years older than 2000 but 1999 is younger than 15 years so it will not be deleted.
Lastly, I want these macros to apply to every sheet except for sheets “Sheet1”, “Sheet2” and “Sheet3”.
I have attached a spreadsheet to help.
Can anyone help me with this?
Bookmarks