Finalizing MACRO

Closed
Eddie - Jun 20, 2016 at 01:10 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 21, 2016 at 11:27 AM
Hello,

I've tired to work with this MACRO but I am trying to combine the content in order for it to work yet I keep getting bugs.
The purpose of this is to pick certain information from sheet 1 and transfer it to sheet 2 in the last rows available.

Sub Update()
Dim faRow, x As Integer

x = ActiveCell.Row
faRow = Sheets("Total").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row

Range("B" & x).Copy Sheets("Total").Range("A" & faRow)
Range("D" & x).Copy Sheets("Total").Range("B" & faRow)
Range("I" & x).Copy Sheets("Total").Range("C" & faRow)

End Sub


To copy row from A to last column used (based on the first row) use:
Dim lCol As Integer
lCol = Cells(1, Columns.Count).End(xlToLeft).Column
Range(Cells(x, "A"), Cells(x, lCol)).Copy



1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jun 21, 2016 at 11:27 AM
Hi Eddie,

What line produces the error?

The only thing I can come up with is that you have more then 32,767 rows of data, but I'm doubtful that is the case.

Best regards,
Trowa
0