Results 1 to 4 of 4
  1. #1
    Rustin788 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    47

    Conditional Formatting Based On Another Column


    Hey,

    I have looked at several different places and still can't quite figure this out. I am trying to run conditional formatting in a report that is based on two different fields. Below is a small example of the data. Each branch has a % increase that should have occurred because of a price increase. For instance Branch 3 is expected to have increased by 4% and Branch 38 by 2%. What I would like to do is include condition formatting where if they did not meet their requirement the percentage is red. So something like: If Branch = 3 and % Increase < .04, make red.

    Branch
    Customer
    % Increase
    3 AMERICA 3.8%
    17 AMERICA 5.8%
    38 AMERICA 3.12%

    Thanks For Any Help

    **EDIT: Thanks pbaldy
    Last edited by Rustin788; 08-13-2014 at 11:55 AM.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You'd use Expression Is and an expression of:

    [Branch] = 3 and [% Increase] < .04

    though if you have too many conditions you'll have to switch to VBA in the format event of the appropriate section. I'd probably make both conditions part of the data so I could include the percentage in the data and simply have:

    [% Increase] < [TargetPercent]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Rustin788 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    47
    Awesome, thank you. I was trying to work it out using an IIf statement in the Expression Is box.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Conditional Formatting based on another field - Part II
    By Harley Guy in forum Programming
    Replies: 8
    Last Post: 10-17-2013, 12:46 PM
  2. Replies: 5
    Last Post: 10-15-2013, 07:49 AM
  3. Replies: 11
    Last Post: 12-21-2011, 09:48 AM
  4. Replies: 2
    Last Post: 09-08-2011, 01:10 PM
  5. Replies: 0
    Last Post: 03-14-2011, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums