excel, VBA code correction (really challenge)
Private Sub Worksheet_Change (ByVal my As Range)
On Error Resume Next
If my.Column = 2 Then
For Each rng In Range ([b2], [b65536].End (xlUp) )
If rng “” And rng (1, 2) Range ( “c1”) Then rng (1, 2) = [$ a $ 2] & rng
Next
End If
If my.Column = 2 Then
For Each rng In Range ([b2], [b65536].End (xlUp))
If rng “” And rng (1, 3) Range ( “d1”) Then rng (1, 3) = [$ a $ 2] & rng
Next
End If
If my.Column = 2 Then
For Each rng In Range ([b2], [b65536].End (xlUp))
If rng “” And rng (1, 5) Range ( ” f1 “) Then rng (1, 5) = [$ f $ 2]
Next
End If
End Sub
above code can run, but there is a very serious problem, When a lot of information, if correct, and I would like to add b out of a line of data, updated slowly, as if to correct or add b out of a line of data, the data should be added before the update again, can not be About improving the code, and add the correct b out of a data line, only to update a data line, other firms do not update.Please help a large errant
I understand END SUB.really challenging ..Private Sub Worksheet_Change (ByVal my As Range)
On Error Resume Next
If my.Column = 2 Then
If my “” And my (1, 2) Range ( “c1”) Then my (1, 2) = [$ a $ 2] & my
If my ; “” And my (1, 3) Range ( “d1”) Then my (1, 3) = [$ a $ 2] & my
If my “” And my (1 , 5) Range ( “f1”) Then my (1, 5) = [$ f $ 2]
End If
End Sub
Leave a Reply
You must be logged in to post a comment.