• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vlookup for Entire column

Hello All,

Kindly support for the below situation

I have countries on sheet1 ColumnD and on sheet2 i have counts of each countries.

so i have to do lookup on sheet1 for each countries.

Attached excel file for your reference.

Thanks in Advance,
Anantha Krishna


Marc L

Excel Ninja
Hi !​
but i want the formula in VBA code
As it is a very beginner level formula so first include your formula within your attachment !​
Then from the formula you could easily create your own VBA code (needing a single codeline ‼)
(which is totally useless as you can copy the result of the formula over the same cells, faster than creating any code !) :​
Sub Demo1()
    With [Sheet1!E4:E10]
        .Formula = "=VLOOKUP(D4,Sheet2!A$2:B$8,2,FALSE)"
        .Formula = .Value2
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !​