Point 1
Always use
Option Explicit
in your code modules. It helps you to avoid errors and ensure your variables are correctly declared
e.g. You will need at least
Dim LastColumn As Long, LastRow As Long, LastRowG As Long
Dim i As Long
Dim rng As Range
Dim FinClass As Range
Doing this might also solve your problem if you include
Dim TestValue As Object
your problem goes away. Alternatively lose the "Set" on
Set TestValue = Cells(i, "G")
Point 2
You will get an error in the following code
Range(FinClass, Cells(FinClass.Row, LastColumn.Column)).Copy
The first closing bracket should be after
LastColumn </code><code>Range(FinClass, Cells(FinClass.Row, LastColumn).Column).Copy
Point 3
It's good practice to explicitly state which workbook and sheet you are using. So instead of
Range(LastRow).Select
use
ThisWorkbook.Sheets(1).Range(LastRow).Select
Point 4
It is also bad practice to use Copy/Paste in VBA. You can assign the values directly e.g.
Range("A1").Copy
Range("Z5").Select
Selection.PasteSpecial
could become
ThisWorkbook.Sheets(1).Range("Z5").Value = ThisWorkbook.Sheets(1).Range("A1").Value