+ Reply to Thread
Results 1 to 8 of 8

Macro to copy row title to a different sheet based on multiple column criteria

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Macro to copy row title to a different sheet based on multiple column criteria

    Hi,

    I am having trouble figuring out the correct code that will copy the Row title on Sheet 1 to Sheet 2 based on criteria in columns E & F on Sheet one.

    The Criteria required needed to return the building name is no activity in 2014, column E, and activity in 2015 ,column F, any activity is acceptable both positive and negative. If the criteria is met I am trying to copy the building name to sheet two, if the criteria is not met then move on to the next row.

    I have attached an example spreadsheet. Also, if there are formulas that would work better I am not opposed to using them.

    Thanks in advance for the help.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    Try:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    It works! Thanks!

  5. #5
    Registered User
    Join Date
    12-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    Hey Mumps1,

    A small follow up question. In my actual spreadsheet I need to run the macro for only rows 50-100 of 'Sheet1' with there being information on the rows above and below that range. How could I update your code to only run the macro on that range?

    Thanks again.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    Hi Steve:

    Use this code instead:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    Thank you!

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Macro to copy row title to a different sheet based on multiple column criteria

    It was my pleasure.

+ 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