Anantha Krishna
Member
Hello All,
Please be informed that i need to get autolookup with out using formula and click on macro button.
I want get value from Sheet4 columnB to Sheet2 ColumnH, based on range Sheet2 ColumnG and sheet4 ColumnA:ColumnB
below code was working for text values, but for numbers it is not working.
>>> use code - tags <<<
Thank you in advance
Regards,
Anantha
Please be informed that i need to get autolookup with out using formula and click on macro button.
I want get value from Sheet4 columnB to Sheet2 ColumnH, based on range Sheet2 ColumnG and sheet4 ColumnA:ColumnB
below code was working for text values, but for numbers it is not working.
>>> use code - tags <<<
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ColumnHCells As Range
Set ColumnHCells = Intersect(Columns(7), Target)
If Not ColumnHCells Is Nothing Then
With ActiveSheet
For Each cll In ColumnHCells.Cells
zzz = Evaluate("WorksheetFunction.VLOOKUP(""" & cll.Value & """,Sheet4!$A$1:$B$3,2,FALSE)")
If Not IsError(zzz) Then cll.Offset(, 4) = zzz
Next cll
End With
End If
End Sub
Regards,
Anantha
Attachments
-
9.9 KB Views: 6
Last edited by a moderator: