mikebecker
Board Regular
- Joined
- Mar 28, 2004
- Messages
- 227
I have data in column A. I need to go to the next empty column to paste data from another workbook. I am having difficulties. Also, I was able to get code to work if there already data in column B, C, ... but if the workbook is new and no data in column B, my code finds the first empty column to the extreme right of the workbook.
This is what I've tried so far..
<font face=Courier New> <SPAN style="color:#007F00">'This command goes to the extreme right of the worksheet</SPAN>
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Range("A1").Select
<SPAN style="color:#007F00">'This command goes to A2 - even with data.</SPAN>
ActiveCell.Offset(0, 1).Range("A1").Select
</FONT>
Regards,
Mike
This is what I've tried so far..
<font face=Courier New> <SPAN style="color:#007F00">'This command goes to the extreme right of the worksheet</SPAN>
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Range("A1").Select
<SPAN style="color:#007F00">'This command goes to A2 - even with data.</SPAN>
ActiveCell.Offset(0, 1).Range("A1").Select
</FONT>
Regards,
Mike