+ Reply to Thread
Results 1 to 7 of 7

Macro that will select range based off cell value in multiple rows

  1. #1
    Forum Contributor
    Join Date
    10-26-2011
    Location
    Ottawa, ON Canada
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    128

    Macro that will select range based off cell value in multiple rows

    2014 CPS BC Spring STATS.xls

    The attached file has a macro that finds and copies rows based off an entry in column M. It works as planned, apart from when M has a formula..

    Basically, I would like the macro to work if the value in M is greater than 0.... either text or a value....

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro that will select range based off cell value in multiple rows

    Hi Hambly,
    It is assumed that the Sheet2 there in your book
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-26-2011
    Location
    Ottawa, ON Canada
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    128

    Re: Macro that will select range based off cell value in multiple rows

    Thanks Nilem. I'd like to just select and copy to the clipboard... I'll be pasting into another file once copied.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro that will select range based off cell value in multiple rows

    something like
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-26-2011
    Location
    Ottawa, ON Canada
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    128

    Re: Macro that will select range based off cell value in multiple rows

    Is it possible to just copy to a clipboard, as the file it's going to will change often. Also the range where it will be pasted will change..

    Thanks for your help..

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro that will select range based off cell value in multiple rows

    In this case just
    Please Login or Register  to view this content.
    I do not really true, that one and the same code will work equally in Windows and Mac

  7. #7
    Forum Contributor
    Join Date
    10-26-2011
    Location
    Ottawa, ON Canada
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    128

    Re: Macro that will select range based off cell value in multiple rows

    Thanks again nilem. The below code seems to work best. I don't think the Mac liked the Auto Filter one... The only thing the below doesn't do, is it won't work if M has a formula... but I can work around that...

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro that will select range based off cell value in multiple rows
    By hambly in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-14-2013, 09:12 AM
  2. [SOLVED] Macro to copy rows (in a range) based on a cell criteria
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-23-2013, 07:54 PM
  3. [SOLVED] Select rows based on date range and copy to multiple tabs
    By B-Rell in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-01-2012, 09:27 AM
  4. VBA select cell range based upon the # of rows that make up a certain merged cell?
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2012, 12:22 PM
  5. Macro to select range based on cell not being blank
    By neb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2005, 01:04 PM

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