Search Specific data from worksheet and Paste on MsgBox

netdiscussion

New member
Joined
Nov 14, 2021
Messages
2
Reaction score
0
Points
0
Excel Version(s)
2013
Dear,
I need support that how can I search specific text from Excel Sheet and paste in MsgBox.
(e.g.)
search specific text is available on Sheet2, A5. So I need to copy value/text from A5 to A11.
Paste A5 to A11 value/text on MsgBox after pressing the button on Sheet1.
both sheets are available on same Workbook.
Thanks
 
Code:
MsgBox Range("A11").Value
 
Code:
MsgBox Range("A11").Value


Brother,
I need range value A5 to A11 to be displayed in MsgBox, above syntax not supported by this way.
Can you please guide?
Thanks
 
Code:
Option Explicit

Sub DispData()
    MsgBox Range("A1").Value _
        & vbNewLine & Range("A2").Value _
        & vbNewLine & Range("A3").Value _
        & vbNewLine & Range("A4").Value _
        & vbNewLine & Range("A5").Value
End Sub
 
Back
Top