Hi all,
Here's some code which is frustrating me!
The last part of the macro RowRead below does not paste the value to the selected cell. When I click in the selected cell manually it works. I need the macro to achieve this automatically, any suggestions or solutions. All answers gratefully acknowledged. The Range "K2:AC2" represents columns 11 to 29 in the code.
Regards,Vern
Here's some code which is frustrating me!
The last part of the macro RowRead below does not paste the value to the selected cell. When I click in the selected cell manually it works. I need the macro to achieve this automatically, any suggestions or solutions. All answers gratefully acknowledged. The Range "K2:AC2" represents columns 11 to 29 in the code.
Regards,Vern
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("K2:AC2")) Is Nothing ThenCall RowRead
End If
End Sub
Code:
Sub RowRead()
Dim i As Integer
For i = 11 To 29
If Cells(3, i) = Cells(1, "B") Then
Cells(2, i) = Cells(4, i)
End If
Next i
Cells(4, i).Copy
Cells(2, i).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False
End Sub