VB and VBA Users Source Code: Re: Re: Copying data between Excel Ranges
[
Home
|
Contents
|
Search
|
Reply
|
Previous
|
Next
]
VB/VBA Source Code
Re: Re: Copying data between Excel Ranges
By:
Wes
Email (spam proof):
Email the originator of this post
Date:
Wednesday, February 11, 2004
Hits:
1483
Category:
VBA (Visual Basic for Applications)
Article:
I also haven the same issue with finding the next available open cell/line etc as well the data I have to copy if from a multitude of areas on a sheet. Some of the data is in rows (horizontal) and some is in columns (vertical). I’ve seen a million examples but nothing to address this type of situation. Here is a snippit of the code I’m using and it works but it’s like driving a 1976 LTD, I’d like to move up to at least 2004 Neon! As well the code goes on to line 248 below the active cell. Whew! Private Sub cmbNewBHA_Click() ActiveWorkbook.Sheets("BHA Master").Activate Worksheets("BHA Master").Range("BB101").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(0, 1).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = Worksheets("BHA Master").Range("s1") ActiveCell.Offset(1, 0) = Range("s2") ActiveCell.Offset(2, 0) = Range("s3") ActiveCell.Offset(3, 0) = Range("aa2") ActiveCell.Offset(4, 0) = Range("aa3") ActiveCell.Offset(5, 0) = Range("g5") ActiveCell.Offset(6, 0) = Range("a9") ActiveCell.Offset(7, 0) = Range("d9") Any help would sure be appreciated. I almost forgot the data is now stored on the same page as it is copied from to reduce the file size.
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder