+ Reply to Thread
Results 1 to 7 of 7

Macro partially working

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    209

    Macro partially working

    Hello,

    In the attached workbook, I have two macros. The first macro (More than), should highlight cells under the condition that the sum of a range in column B is greater than the average in range column C. The bounds of the range is determined by unique items found in column A.
    It should do this for each unique item in column A (cells in bold should highlight. For some reason, only A9:A15 are highlighting.

    In my second macro (Less Than), the opposite condition happens. For this macro, it should highlight cells A21:A22, but it is also highlighting A9.

    Any thoughts?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,359

    Re: Macro partially working

    Hi phbryan,

    Let me know how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    209

    Re: Macro partially working

    Hey Robert,

    I get a Runtime Error at this line:
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 06-26-2021 at 11:05 AM. Reason: Please do not quote the entire post to respond to it

  4. #4
    Valued Forum Contributor
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    469

    Re: Macro partially working

    The .NET Framework version 3.5 is required for this solution. There may be a different version on your computer, but 3.5 is required. Additionally, install version 3.5 and enjoy the possibility of using ArrayList.

    Artik

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,359

    Re: Macro partially working

    Here's another (virtually same) way but uses collections:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    209

    Re: Macro partially working

    Thank you Artik and trebor. The macro now runs.
    The macro should have highlighted A2:A6 and A9:A13, but it did not. See this most updated workbook.
    Attached Files Attached Files
    Last edited by phbryan; 06-26-2021 at 08:00 AM.

  7. #7
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,359

    Re: Macro partially working

    Try this:

    Please Login or Register  to view this content.
    Last edited by Trebor76; 06-26-2021 at 08:05 PM.

+ 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] ISERROR partially working
    By jimbokeep in forum Excel General
    Replies: 5
    Last Post: 11-18-2016, 12:03 PM
  2. save as macro partially working
    By tigergutt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2016, 07:12 AM
  3. [SOLVED] Calculation partially not working
    By WilliamWelch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2015, 05:27 PM
  4. [SOLVED] Help with partially working Macro to separate groups
    By kleptilian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2015, 02:14 PM
  5. [SOLVED] Code only partially working
    By Saeber4777 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-11-2014, 10:53 PM
  6. [SOLVED] PC Macro only partially working on Macs
    By sdnorton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2014, 01:38 PM
  7. Macro only partially working
    By LilSisKin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-26-2013, 06:04 PM

Tags for this Thread

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