+ Reply to Thread
Results 1 to 4 of 4

Color Coding Issue

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Color Coding Issue

    I am using a macro to color code many cells in my worksheet. I have 2 columns which I check values on and then color code cells based on those values. I've used this method in the past and have had no issue.

    So I loop thru the specified rows and change cell color based on values in the trigger column. I check AV32:AV169 and set the color using cell offset. This is working fine, however on the second phase I loop thru AX32:AX169
    but none of the target cells are affected.

    Then I go to cell AX32 and put my cursor at the end of the **formula and hit enter and it fills in the colors as intended. The **formula is present in AX32 to set the color trigger value.

    My workbook is too large to load but thought someone may have encountered a similar situation and can advise.

    I've copied the macro to a .txt file and attached it to this post.

    I have shortened it in the example by eliminating many repetitive value checks.

    Thanks for any help...
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Color Coding Issue

    If I understand correctly you are saying that your code sets fill colors of some cells based on the values in other cells. When the code loops through AX32:AX169 to determine when to update fill colors, nothing happens. But then if you force a reevaluation of AX32 then the colors all change.

    I am not sure what your problem is, but it seems to me that this could all be done with conditional formatting instead of VBA. Hard to help without your file, though.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: Color Coding Issue

    You have stated the problem exactly. I'm ok with changing to conditional formatting which I did use in earlier excel versions (2003), however I'm not sure how to do that in excel 2016. I can try to look at that again but shouldn't the VBA version work also?

    Thanks

  4. #4
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: Color Coding Issue

    As a follow up:

    I did look closer at using conditional formatting and was able to set up the color coding as I want. Thanks again and I will mark this thread solved.

+ 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. color coding based on color in another cell
    By dbasch89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2014, 05:57 PM
  2. VBA coding issue
    By rebel_yell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2014, 10:12 AM
  3. [SOLVED] Coding Issue Error 1004
    By pmensch in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-01-2013, 12:53 AM
  4. [SOLVED] next available row coding issue
    By JAL_0110 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-21-2013, 05:47 AM
  5. Query & Coding issue
    By abenny in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2011, 01:13 PM
  6. Coding Issue Aaaargh....
    By JoeSharp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-25-2008, 07:04 AM
  7. Color coding
    By Roymund in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-17-2007, 01:26 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