Results 1 to 4 of 4

Find specific value in a cell, select the cell and copy all cells beneath

Threaded View

  1. #1
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    Talking Find specific value in a cell, select the cell and copy all cells beneath

    I have been trying to get this to work. I thought I was going in the right direction, but it's not working for me.

    I want the macro to find a cell containing a specific text. Once that cell is found, I want all cells beneath it that contain a non blank to be copied.

    Any help would be appreciated.

    Sub test2()
        Dim MyRange As Range
                    Set MyRange = Cells.Find(What:="Shortage", After:=ActiveCell, LookIn:=xlFormulas, _
            LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
    
    
        Range(MyRange, Range(MyRange).End(xlDown)).Copy
        Sheets("Item List").Select
        Range("R2").Select
        ActiveSheet.Paste
    
    
    End Sub
    Last edited by Mothman; 09-19-2010 at 11:25 PM.

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