Click here to Skip to main content
15,879,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to take the values of the range I have defined and paste them in the last row of my sheet.

What I have tried:

   iCol = Cells(FinClass.Row, Columns.Count).End(xlToLeft).Column - FinClass.Column + 1
    If iCol < 1 Then iCol = 1
    Set FinClass = FinClass.Resize(1, iCol)
Range(LastRow).Value = FinClass.Value

When using this I get an error that says range of object global failed.
Posted
Updated 24-Feb-22 4:01am

1 solution

<pre>iCol = Cells(FinClass.Row, Columns.Count).End(xlToLeft).Column - FinClass.Column + 1
    If iCol < 1 Then iCol = 1
    Set FinClass = FinClass.Resize(1, iCol)
FinClass.Copy Destination:=Cells(LastRow + 1, "Q")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900