Solved: Macro To Loop through a column in the workbook
:motz2: I'm trying to write a macro which will start the loop from cell M8 in my workbook. Essentially looping through all the sheets except "test".
The basic idea of the loop is to check whether any cells have a value of 1 in col M beginning from row 8 down to the last used cell and if it does find 1, then to look across the corresponding row in Col B to ascertain whether it is blank or not.
Example, say cell M8 = 1 then macro looks at Cell B8, and if cell B8 = blank.
If in the workbook after looping through all the sheets except "test", if the macro finds cells in col B = Blank when the corresponding row in Col M = 1, then it should give the excel user a Msg to check for missing explanations in col b.
I think this code should run in "workbook" module as a Workbook Before_CLose event.
I've the basic idea but don't know how to go about constructing the code.
Any help will be appreciated.
Thanks,
K