Related:
- Help in Excel macro
- Excel online macros - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel run macro on open - Guide
- Gif in excel - Guide
- Kernel for excel repair - Download - Backup and recovery
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