Hi, in the spreadsheet attached I'm trying to use macros to generate the number of rows in cells A2 (in both sheets) to increase linearly starting from B4 downwards. e.g. if cell A2 had the number 5 in it, cells B4 to B9 would fill from 1 to 5. I've done the coding on VBA to do this, but the next step I'm trying to achieve is to use macros for different sheets as I've tried to attempt in the VBA code. But the coding for the second sheet isn't working. I'm very new to using excel macros, and I tried looking up the error to the code and tried debugging but I can't find the solution. Is the Sheet2! referencing wrong to do in this case?, because that's what I always used in IF statements in excel when i reference other sheets in the workbook.
Bookmarks