Hi!
Following macro reads the no. of rows in column ‘D’ (in Sheet1) having data, and puts serial nos. in Column ‘C’ starting from row C2 (since cell D1 has column header).
When I run the macro from the same sheet, the macro run properly. However, if the active sheet is something other than Sheet1, then the code tries to read the non-empty cells in column D of the currently active sheet and puts serial nos. accordingly in Sheet1.
I am not sure how to run the Evaluate function from some other sheet.
Sample file attached. Please run the code from Sheet1 & Sheet2 to see the issue
Thanks
Bookmarks