+ Reply to Thread
Results 1 to 5 of 5

vba - copy entire row based on cell value

  1. #1
    Registered User
    Join Date
    09-24-2003
    Posts
    62

    vba - copy entire row based on cell value

    i want to search sheet("1").range("S:S") for str1 = "23320"
    and if found, copy the entire row to sheet("2").range("next available row").

    I have tried tweaking multiple codes that i have found but can't seem to get any to work right.

    there will be upto 100 different Str's to search on sheet ("1"), some Str's will be copied to sheet("3"), ("4") etc. this i think i can do myself once i get a code to work for the first part.

    Thanks in advance for any help!

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    I think this will do what you want.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-29-2007
    Location
    Missouri, USA
    Posts
    29
    I have a similar question to this. Let me preface this problem with the disclaimer that i know next to nothing about VBA, so i'm not able to modify the existing code. My problem is almost exactly the same. I want to search the sheet2(historical) look for today's date in column A. When found, i want all of those rows copied, and then pasted special values.(to change the formulae i have in there to hard coded numbers.) The data that i'm pulling from is an external database query that changes everyday, but i want to keep all the records for my group easily.

  4. #4
    Registered User
    Join Date
    01-23-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: vba - copy entire row based on cell value

    Trying to revive this old thread -

    I am doing something similar and was able to use this code; however, I have several matches that I am trying to copy to another sheet. This particular code stops at the first one. How do I loop this for multiple matches?

    Ultimately, I am creating a spreadsheet to track units through a process. I have a tab for each phase of the process. As a unit goes through this process, I have a pulldown menu in a column to indicate which phase of the process said unit is in. What I'd like to do is have the phase tab populate automatically when a the status of that unit is changed.

    Any assistance is highly appreciated.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: vba - copy entire row based on cell value

    myocom08,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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