Is there a better way?
Posted on 2014-03-17
I have the following script and it works just fine:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r1 As String
r1 = Target.row
Dim a1 As String
a1 = Target.Address
Worksheets("Brs").Range(a1).offset(0, 24).value = Worksheets("CurrC").Cells(r1, "G").value
'The only problem is that I find it tedious to count out the left hand side of the equation 'since I have many to do.
'I would much rather use something like this and use the column identifier (in this case AE) rather than counting out every little thing:
Worksheets("Brs").Cells(r1, "AE").value = Worksheets("CurrC").Cells(r1, "G").value
'but I cannot seem to get it to work. So in short it is the left hand side of this equation that I am trying to make better.