Related:
- Help in Excel macro
- Number to words in excel - Guide
- Gif in excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Marksheet in excel - Guide
- Macros in excel download free - Download - Spreadsheets
1 response
You might want to try assigning the sheet names to the variables. If you work between sheets, Excel will get
"confused" if you just say....for example, Range("A1"). It is fine in the active sheet, but once you start moving
between sheets, then Range("A1") of what sheet?
For example:
Instead of,
K = Range("A65536").End(xlUp).Row 'finding the last row before blank
Co = Range("A1").End(xlToRight).Column 'Finding the last Column before blank
Try:
K= Sheets("MySheet").Range("A65536").End(xlUp).Row
Co = Sheets("MySheet").Range("A1").End(xlToRight).Column
"confused" if you just say....for example, Range("A1"). It is fine in the active sheet, but once you start moving
between sheets, then Range("A1") of what sheet?
For example:
Instead of,
K = Range("A65536").End(xlUp).Row 'finding the last row before blank
Co = Range("A1").End(xlToRight).Column 'Finding the last Column before blank
Try:
K= Sheets("MySheet").Range("A65536").End(xlUp).Row
Co = Sheets("MySheet").Range("A1").End(xlToRight).Column
Mar 26, 2009 at 11:28 AM
It worked...I was not activating the worksheet