I have a macro that will output a negative value if something is wrong with a certain row. What I want to do now is make a macro that will scan sheet 2 thru the end for the last 7 rows with data, and count negative values. If 4 of the 7 have negative values, it goes into Sheet 1 and puts an x next to the sheet name.
Logic:
hit button on sheet 1 -> go to Sheet 2 - count negative values in last 7 rows on column K (11) -> if more than 4, go to first sheet to the sheet name (column J) -> go right 2 -> put an X -> go to sheet 3
I tried my hand at writing some of the code, but I'm still very new at excel...
'loop thru all the worksheets, selecting the last 7 values in column J and defining that as a range. in the code below, I try to do stuff with the range but I get very lost there.
'not sure how to implement this part about writing to the first sheet
Thanks, I'm really terrible at code...
Bookmarks