Consulting

Results 1 to 6 of 6

Thread: Solved: Search Macro and Merged Cells

  1. #1
    VBAX Regular
    Joined
    Nov 2006
    Posts
    81
    Location

    Solved: Search Macro and Merged Cells

    I have a search Macro in attached book and it searches down column A for first empty cell. Now I have cells in Column A that is merged and it doesn't search past those....Any Ideas?

    Thank you

  2. #2
    VBAX Regular
    Joined
    Nov 2006
    Posts
    81
    Location
    Solved.
    [VBA]
    Sub LastRow()
    Range("a65536").End(xlUp).Offset(1, 0).Select
    End Sub
    [/VBA]

  3. #3
    VBAX Mentor MaximS's Avatar
    Joined
    Sep 2008
    Location
    Stoke-On-Trent
    Posts
    360
    Location
    use column "D" for your search

  4. #4
    VBAX Regular
    Joined
    Nov 2006
    Posts
    81
    Location
    Thanks but you would want to search in row a,b or c. The values in d could vary from one to seven. Thank you for your time.

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [vba]Sub Search()
    Dim c As Range
    Set c = Range("A:A").Find("")
    c.Select
    End Sub
    [/vba]

    or even
    [VBA]
    Sub Search()
    Range("A:A").Find("").Select
    End Sub

    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  6. #6
    VBAX Regular
    Joined
    Nov 2006
    Posts
    81
    Location
    Thank you again,mdmackillop. Your always such a great help.


    Would be great to have half your talent. ........one day...

Posting Permissions

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