+ Reply to Thread
Results 1 to 20 of 20

Basic Conditional Formatting

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Basic Conditional Formatting

    Very basic formatting question. I'm trying to highlight a certain cell or row based upon a rule (comparison of the sum of two cells to another cell).
    Trying format a row's color base upon a simple comparison (if,then) in that row. Example:

    =if F10+G10>H10, highlight or fill the entire row red

    I'm using 2007 right now. I can't get the conditional formatting tool to do this with a rule "use a formula to determine which cells to format." Not sure what formula to put into the box when creating this rule.
    (Also, I am clicking the format button and choosing a fill of red, but what cells or rows is it setting this rule for (what cells or rows will be filled red))?
    Ideas? Thank you so very much!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    You were almost there...

    Hightlight the range and in conditional formatting enter...

    =$F10+$G10>$H10
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    Thanks Jeffrey!
    So the box (format values where this formula is true) is the "IF", and Format Preview is the "Then."

    How would I pull that formula down, to analyze each row, and return that format if that row's formula is true (F+G > H)?
    Would each row need its own rule?

  4. #4
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    Thanks Jeffrey!
    So the box (format values where this formula is true) is the "IF", and Format Preview is the "Then."

    How would I pull that formula down, to analyze each row, and return that format if that row's formula is true (F+G > H)?
    Would each row need its own rule?

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    Okay let's see if these steps help. I am using 2007

    Highlight range >> I highlihted A10:H20
    Home >> Conditional Formatting >> New Rule >> Use a formula to determine which cells to format
    Under: Edit the Rule Description
    Enter: =$F10+$G10>$H10
    Pick Format and click OK

  6. #6
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Cool Re: Basic Conditional Formatting

    Worked perfect! Thanks! Had to tweek row number in formula (to what row I started my highlight range on (elsewise the highlighted rows were off)).
    Thanks a million Jeffrey!

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    Glad it worked for you and thanks for the feedback.

    When working with conditional formatting it is important to know that starting row. After you highlight your range, look at the top left (right above A1) at the name box.

    Whatever is in this box is your anchor point for the conditional formats. In my case I started highlighting the range with A10 so when I look at the name box I see A10.

    Hope this helps...

  8. #8
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    Tremendous help! Thanks again. I'm not the best at conditional formatting (as you can see), but am learning it and it seems to be like other excel functions; logic, anchor points, etc.
    One last step:

    I have 2 tabs/sheets, a data input tab (lots of messy data) and a Viewable tab (output for report, very clean and easy to read). How would I get the formatting of the row (in the Data input tab) to carry over to the viewable tab? I'm using a VLookup on the viewable tab, to carry over only the needed rows from the hefty, messy data tab. Thoughts???

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    Sorry been away for awhile...yard work

    As for conditional formatting from one tab to the next, conditional formatting does not cross across tabs unless you are using some type of named ranges. To give the best advice, I would need to see a sample workbook with you layout and what you have and what you desire.

  10. #10
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    It's a simple little workbook. Can I upload it?

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    Yes, when you reply, hit Go Advanced and then manage attachments

  12. #12
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Talking Re: Basic Conditional Formatting

    Here is the small file. 4 sheets in this workbook. the right two are the data input. The left two is the cleaner output. I need to protect some cells, etc. Am I on the right track with this? The conditional is highlighting the row red if F & G exceed balance in savings.
    Thanks a million!
    Attached Files Attached Files

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    Do you want the row hightlight red if either F or G exceed E?

    =OR($E2>$F2,$E2>$G2)
    Last edited by jeffreybrown; 04-24-2012 at 10:59 AM.

  14. #14
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    if the sum of them exceed (then that customer doesn't have enough money in their savings deposit, so we want a flag raised to us). I guess one could just set up conditionals on the output worksheets, but then it gets messy tying some things to input sheet and others to output sheet, etc....

  15. #15
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    If you have two summary sheets which are being fed by vlookups from the customers sheets, I don't see why =SUM($F2:$G2)>$E2 on the master sheet would not work for you to highlight the row.

  16. #16
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    I guess that works. I just try to steer clear of getting too many formulas mixed into the master sheets, as we use the masters for our output and run them once a week.
    If we tracking this on a weekly basis (the prior weeks ending balance becomes next weeks beginning balance) how would you suggest setting it up?:
    -Create a new workbook for each week?
    or
    -Keep the same workbook, just create more tabs (sheets) for each week?

    I'm thinking I should start using Access to build a database of activity for each customer...

  17. #17
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    It is really hard suggesting a setup when in the end I really do not know your end goal.

    My first impression, keep all information on the same tab. I would not be a fan of making seperate weekly sheets, but again, I really don't know your requirements.

    By keeping all the information on the same tab and adding a column for week number, you can now easily draw up older data. When the data is seperated into different tabs then different strategies are required.

    As far as running the macros once a week, you could setup another macro to apply the conditional formatting but all this will have to be laid out by you or the users.

    Access could be another option depending on how much data you are dealing with. This site has some good pre-built tutorials http://www.vertex42.com/

  18. #18
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    Thanks for you help Jeffrey. It's much appreciated!

  19. #19
    Registered User
    Join Date
    04-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Basic Conditional Formatting

    The conditional doesn't like the vlookup. It isn't recognizing the values it is producing, so it won't highlight/fill red if over the amount that is specified... any thoughts?

  20. #20
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Basic Conditional Formatting

    No there is no reason why conditional formatting would reject a vlookup or any other function returning a value.

    Also, on the note of a vlookup, you should look into the arguments of the vlookup. You are missing the 4th >> =VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

    Again, everybody has a desired way of setting up a spreadsheet and here is just an option. I would not mess with a summary sheet, just hide all of the rows you don't want to see and it match your summary page. The fewer times you replicate your data the better.

    As for the cf not working, if you can attach a sample when it doesn't work for you I would be happy to look at it.

    Also, check out the new sheet I added. The cf still works with the vlookup. Just change the cell in yellow.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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