+ Reply to Thread
Results 1 to 4 of 4

Copy row if value matches 'Sheet'!B1

  1. #1
    Registered User
    Join Date
    07-22-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    38

    Question Copy row if value matches 'Sheet'!B1

    Hi guys,

    Need some help with a side project i'm trying to do... THANK YOU for any assistance

    I've seen similar question to this...and have been trying to make other codes work with what i want... either i suck or i'm leveraging from the wrong starting point.

    Scenario:
    1. Data is pasted in to "Master" Sheet.
    2. Click "Run Report" button
    3. VBA does its magic. but i cant seem to get any magic going

    Sample1.xlsm
    VBA is to...
    • In each sheet "B1" has a value,
    • value needs to be searched against "Master!A:A "
    • IF matches cut the row
    • Paste into next available row for that sheet (for each relevant sheet)
    • Once completed "Master!" should be blank & relevant data moved to each sheet...

    Because i'm not great at explaining i have uploaded an example of my craziness.


    Thanks in advance for any replies
    Last edited by ngocpdn; 03-21-2013 at 04:52 AM.

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Copy row if value matches 'Sheet'!B1

    Hi
    I created some simple macro (see attachment) and it does its magic, although I'm not sure, if this is what you expected.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-22-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Copy row if value matches 'Sheet'!B1

    Sbarro79,

    Thank you thank you thank you!
    It is Exactly what I was hoping to do

    The code you made was so simple and clean. When I look at what I was trying to do/edit... I feel like a moron.
    This will make life so much easier.

  4. #4
    Registered User
    Join Date
    07-22-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Copy row if value matches 'Sheet'!B1

    Hi Sbarro79...

    When I change the code to search Master!B1:B instead of A:A it doesn't work..
    Is it possible to make it search column B instead?

    Other than that the coding does what I'm looking for.

    Thanks again.

+ 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