Finalizing MACRO

Closed
Eddie - 20 Jun 2016 à 13:10
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 21 Jun 2016 à 11:27
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 12 September 2010 Status Contributor Last seen 27 December 2022 555
21 Jun 2016 à 11:27
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