+ Reply to Thread
Results 1 to 2 of 2

VBA Area Selection

Hybrid View

  1. #1
    Registered User
    Join Date
    05-25-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA Area Selection

    I want to select an area from a list of data by finding the name of the first item, then running to the next blank cell. Can anyone tell me how to do this within visual basic?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: VBA Area Selection

    Try This,

    Sub FindAndSelect()
    
        s = InputBox("Find Something")
    
        Columns(1).Find(What:=s, After:=Cells(1, 1), LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
                        SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
        Range(ActiveCell, ActiveCell.End(xlDown)).Select
    
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1