+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting formula issues (dynamically changing the sheet name in the formula)

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    home, USA
    MS-Off Ver
    Excel 2010, 2011
    Posts
    3

    Conditional formatting formula issues (dynamically changing the sheet name in the formula)

    Hello all,
    I have a workbook that has roughly 100 sheets in it, the sheet names are T1-T49 and V1-V47, I have a “summary” sheet that collects the status of various work that is being done in those sheets. On the summary page, in Column B I have the list of the sheet names. We will use row 4 for this example, I want to use a formula to change the fill color of cell D4 based on text that is on Sheet T1 Cell B13, “In progress” for example. I have this working as a conditional formatting rule with the following formula, =‘T2'!$B$13="In Progress" however the sheet name needs to be edited for each conditional rule. I was looking at using indirect to look up the sheet name so i can copy the formula and not have to manually edit the formula when its copied to a new row. Does this make sense? Ideally I would like something like this =INDIRECT("'" & B4 & "'!$B$13="In Progress”) would turn the cell to be yellow so, when I copy the formatting it updates the B4 to be B5.

    If you want to see the spreadsheet I can share it, so you can understand what I am trying to do. I’m just trying to avoid having to manually edit 2500 conditional formatting rules.

    For Row 4

    The conditional formatting rules I have working in E4 on summary are:

    =‘T1'!$B$13="Not Applicable" changes the cell to be gray
    =‘T1'!$B$13="Not Started"”changes the cell to be red
    =‘T1'!$B$13="In Progress" changes the cell to be yellow
    =‘T1'!$B$13="Completed" changes the cell to be green

    Then in F4 on summary:

    =‘T1'!$B$14="Not Applicable" changes the cell to be gray
    =‘T1'!$B$14="Not Started" changes the cell to be red
    =‘T1'!$B$14="In Progress" changes the cell to be yellow
    =‘T1'!$B$14="Completed" changes the cell to be green

    In row 5 on summary:

    E5 on summary are:

    =‘T2’!$B$13="Not Applicable" changes the cell to be gray
    =‘T2’!$B$13="Not Started"”changes the cell to be red
    =‘T2’!$B$13="In Progress" changes the cell to be yellow
    =‘T2’!$B$13="Completed" changes the cell to be green

    Then in F5 on summary:

    =‘T2’!$B$14="Not Applicable" changes the cell to be gray
    =‘T2’!$B$14="Not Started" changes the cell to be red
    =‘T2’!$B$14="In Progress" changes the cell to be yellow
    =‘T2’!$B$14="Completed" changes the cell to be green

    And those are working great, they just require the sheet name to be modified when the formatting is copied to a new cell.

    Or, is there a better way to create a stop light chart on the summary sheet based on text in the cells on other sheets?

    Thanks for any help.

  2. #2
    Registered User
    Join Date
    11-27-2013
    Location
    home, USA
    MS-Off Ver
    Excel 2010, 2011
    Posts
    3

    Re: Conditional formatting formula issues (dynamically changing the sheet name in the form

    Wanted to add, I got Excel to the this formula:

    =INDIRECT("'" & B4 & "'!$B$13=“In Progress") in the conditional format rules, but the colors aren't changing, in fact they have stopped working.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formatting formula issues (dynamically changing the sheet name in the form

    Hi and welcome to the forum

    1st, instead if repeating the rules for reach row (looks like that's what you have done?), you can just specify the entire range in te "applies to" part of the CF window.

    2nd. put that INDIRECT formula in a cell IN the worksheet, and see what it gives you (thats how I great all my complex CF rules - put them in the W/S, constructed to return TRUE or FALSE) If is is not giving what you expect, play with it until you get what you want.

    aaahhh wait, I think I see your problem, you closed the ) too late....
    =INDIRECT("'" & B4 & "'!$B$13=“In Progress")
    should be...
    =INDIRECT("'" & B4 & "'!$B$13")=“In Progress"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    11-27-2013
    Location
    home, USA
    MS-Off Ver
    Excel 2010, 2011
    Posts
    3

    Re: Conditional formatting formula issues (dynamically changing the sheet name in the form

    Hi thanks for the welcome.

    Now for the spreadsheet, it's actually worse that repeating for each row its repeating for each cell. I have 7 cells in each row on the summary page that look at static cells on each sheet that is tracking progress. I actually got excel to take the indirect command, but excel keeps formatting it like this:

    =INDIRECT("'" & B4 & "'!$B$13")=“In Progress")

    Excel is adding the second ), I formatted it like you suggested and it takes, but then when you edit the rule again, it has the second )

    I don't understand why it keeps adding the second ) because it has to many )s to (s, however in this format it takes the formula, but the colors are no longer changing, my plan for Monday (I'm in the US so tomorrow is a holiday) and off on Friday. Is to bring the formula out of the CF and just put it in a cell to see what its returning. Is there a way to attach files, or am I too new to the forum to do that? I have a cut down version of the spreadsheet that I can share.

    Thanks for the help,
    Ben
    Last edited by nebmot; 11-28-2013 at 02:13 AM.

+ 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] Changing text color usinf a formula (NOT Conditional Formatting)
    By John Elliott in forum Excel General
    Replies: 9
    Last Post: 09-18-2014, 09:43 AM
  2. Changing Text Format with Formula or Conditional Formatting with multiple values
    By gerodr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2011, 08:54 AM
  3. Replies: 1
    Last Post: 02-26-2011, 10:02 PM
  4. [SOLVED] Changing a Formula in Conditional Formatting
    By Dee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2005, 06:20 PM
  5. [SOLVED] Changing a Formula in Conditional Formatting
    By Dee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2005, 06:17 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