+ Reply to Thread
Results 1 to 4 of 4

trying to create a formula for rules and color coding

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Denver CO
    MS-Off Ver
    windows 7 office suite
    Posts
    2

    trying to create a formula for rules and color coding

    Hey all. Just joined and this is hopefully an easy question. I have an excel table that calculates sales amounts of different people but the amount of people I have on a given day is different. I want the cells to shade green if the store met goals that day and red if it falls below. Each person has a sales goal of $500.

    I am currently using the formula =SUM(B2:B16)/MAX (1, COUNT(B2:B16)-COUNTIF(B2:B16,0)) so that the averages exclude empty cells for when certain sales people aren't there. Additionally it makes the rule in that cell easy as greater than $500 shades green and less than $500 shades red.

    The problem is that the store total won't shade properly on many days. Most of the time I have 8 people working the store so naturally $4000+ is a good day and would shade green. Sometimes though I have 6, 9, etc so it skews the math. 9 people selling $480 puts us well over the $4000 mark but each individual missed individual goals. Conversely 5 sales people at $570 meets individual goals AND store goals but is less than $4000 so the individual's cells shade green but the store stays red but I would want it to be green.

    What formula do I need for this or do I need a macro or what?

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: trying to create a formula for rules and color coding

    can you post a sample spreadsheet

    how are you setting the store colour

    have 2 rules
    one for the people
    and 1 for the store
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    Denver CO
    MS-Off Ver
    windows 7 office suite
    Posts
    2

    Re: trying to create a formula for rules and color coding

    http://imgur.com/kCcfNtC

    If you look at cells b20:c21 you'll see what I mean. Cell b21 is shaded green because above $500 is a great day for our average per person. b20 is shaded wrong though because if we hit per salesperson goals then the store did well. Similarly c20 is wrong because we didn't hit per salesperson goals but we had more total sales then on the day with b20. I don't know how to make the cell rule only consider how many reps there are on a given day for color shading. Right now the rule is just below 4000 and above 4000. I don't want to have to manually enter a different number for the rule by each day but that is all I can think to do. There has to be a robust way to do this right?

  4. #4
    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,938

    Re: trying to create a formula for rules and color coding

    Please upload a sample of your workbook to the forum, not all members can access file-hosting sites (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

+ 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. Replies: 1
    Last Post: 04-22-2014, 05:32 PM
  2. Need to add Color coding to Countif formula
    By Snickers in forum Excel General
    Replies: 0
    Last Post: 01-04-2011, 01:58 PM
  3. Formula for color coding
    By rlkerr1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2008, 04:48 PM
  4. Text color rules
    By Ponk in forum Excel General
    Replies: 3
    Last Post: 03-30-2005, 02:06 AM
  5. Formula Color Coding
    By Andrew in forum Excel General
    Replies: 5
    Last Post: 03-25-2005, 05:06 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