• 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.

How to get adjecent cell value using VBA if value find

Nitesh Khot

Member
Hi...

How to get value in msgbox of String "App" from column B Using vba code..

below is data ...

Column A Column B

Static Amount
App 980767
Down 474561
Total 1455328

I want to to display value only App...ie. 980767 in messagebox
 
Hi Nitesh,

Not really sure about your exact requirement, however, you can use the codes on below lines..

Code:
Sub test()

Dim vResult As Long
Dim RngLookup As Range

Set RngLookup = Range("A2:B4")

vResult = Application.WorksheetFunction.VLookup("App", RngLookup, 2, False)

MsgBox "My Value is " & vResult, vbOKOnly + vbInformation

End Sub
 
Back
Top