Results 1 to 4 of 4

Thread: Search Specific data from worksheet and Paste on MsgBox

  1. #1
    Neophyte netdiscussion's Avatar
    Join Date
    Nov 2021
    Posts
    2
    Articles
    0
    Excel Version
    2013

    Lightbulb Search Specific data from worksheet and Paste on MsgBox



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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

  2. #2
    Conjurer Logit's Avatar
    Join Date
    Nov 2016
    Posts
    323
    Articles
    0
    Excel Version
    2007
    Code:
    MsgBox Range("A11").Value

  3. #3
    Neophyte netdiscussion's Avatar
    Join Date
    Nov 2021
    Posts
    2
    Articles
    0
    Excel Version
    2013
    Quote Originally Posted by Logit View Post
    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

  4. #4
    Conjurer Logit's Avatar
    Join Date
    Nov 2016
    Posts
    323
    Articles
    0
    Excel Version
    2007
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •