• 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

    Hui...

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

lookup two values using vba

Something like!

Code:
Const strF As String = "=LOOKUP(,-1/(INDEX(main,,MATCH($A$1,main!$1:$1,0))=$A2)*(INDEX(main,,MATCH($B$1,main!$1:$1,0))=$B2),INDEX(main,,MATCH(C$1,main!$1:$1,0)))"

Sub Query()
With Sheets("fetch").Range("C2:E26")
    .Formula = strF
    .Value = .Value
End With
End Sub
 
Hi Deepak,

if addid and trascation id in fetch work sheet is found in main sheet the corresponding addcity,buyer city,subcategeory will come in to fetch sheet in dynamic way.please sea the red color formate in attachment.

Thanks
 

Attachments

Back
Top