m_vishal_c
Board Regular
- Joined
- Dec 7, 2016
- Messages
- 209
- Office Version
- 365
- 2016
- Platform
- Windows
hi, i want to apply vlookup only on blank cell through VBA. I am using below code, but it gives me all column value instead of only blank cell.
Private Sub CommandButton2_Click()
Dim FileName2 As String
FileName2 = "D:\1.0 Projects\[First.xlsx]"
ActiveWorkbook.Worksheets("Sheet1").Range("AZ3:AZ4000") = "=VLOOKUP(A3,'" & FileName2 & "main'!$A$3:$CC$4000,81,FALSE)"
Sheets("Sheet1").Columns(53).Copy
Sheets("Sheet1").Columns(53).PasteSpecial xlPasteValuesc
End sub
is anyone who can help me.
heaps thanks in advance
thanks
Private Sub CommandButton2_Click()
Dim FileName2 As String
FileName2 = "D:\1.0 Projects\[First.xlsx]"
ActiveWorkbook.Worksheets("Sheet1").Range("AZ3:AZ4000") = "=VLOOKUP(A3,'" & FileName2 & "main'!$A$3:$CC$4000,81,FALSE)"
Sheets("Sheet1").Columns(53).Copy
Sheets("Sheet1").Columns(53).PasteSpecial xlPasteValuesc
End sub
is anyone who can help me.
heaps thanks in advance
thanks