+ Reply to Thread
Results 1 to 7 of 7

If statements and conditional formatting

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    Bath
    MS-Off Ver
    Excel 2003
    Posts
    3

    If statements and conditional formatting

    Hi

    I have the following information....
    Wk1 Result Calls Days
    130 Met 130 4
    60 Not 60 5
    11 Not 11 5
    155 Met 155 5
    130 Met 130 5
    110 Met 110 4
    55 Met 55 2

    Formula in Result is.....=IF(F7/G7>=V3,"Met","Not").
    The value in V3 is currently 130.

    What i want to do is be able to conditionally format the values in Wk1 so that if they are above or equal to 130 they go green, below 130 they go red. I have done this and it works, however if/when the values in Calls/Days are changed, the conditional formatting in Wk1 doesn't update.

    Help please, this is driving me insane!

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,158

    Re: If statements and conditional formatting

    I'd suggest you change V3 to $V$3 in both the formulae and the Conditional Formatting.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: If statements and conditional formatting

    What range is your data table in?

    Don't really understand how your formula in the result column relates to it.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: If statements and conditional formatting

    I'll second that Dom

    Hi confusedcontroller

    Welcome to the forum

    You would do best to post a sample workbook showing your Sheet Layout and perhaps Before and After examples.

    It should clearly illustrate your problem and not contain any sensitive data.


    Cheers

    From Forum FAQs

    How do I attach a file to a post?

    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'. To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'. Clicking this button will open a new window for uploading attachments. You can upload an attachment either from your computer or from another URL by using the appropriate box on this page. Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file. To upload a file from another URL, enter the full URL for the file in the second box on this page. Once you have completed one of the boxes, click 'Upload'.

    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.

  5. #5
    Registered User
    Join Date
    02-10-2011
    Location
    Bath
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If statements and conditional formatting

    Hopefully the attachement worked.

    The end result would be that columns C,D and E will be hidden. Column B will show a figure and be highlighted green or red depending on the value of column C.

    E.G. If C2 is green and "Met" then B2 would show the number from D2 and be highlighted green.

    I did format this but have done something wrong as when/if the figures in columns C and D are changed, this didn't affect the formatting in coumn B.

    Any thoughts?
    Attached Files Attached Files

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: If statements and conditional formatting

    I can't see a problem with what you have.
    Did you want Column B to show formatting not C as your sample shows?

    However I have changed the formatting to use a simple formula.

    If you don't want the whole row within the table formatted, change the
    Applies To
    from =$A$2:$E$8
    to =$B$2:$B$8

    Hope this helps, it's only a guess.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    02-10-2011
    Location
    Bath
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If statements and conditional formatting

    Maybe if i explain what i am aiming for it might be easier to understand.

    We have a call target of 26 calls per day, pro-rata.
    I want the table to show, in 1 column, how many calls have been made and whether this met the target or not.

    Your changes are ok, until you change the amount of calls, the target may then not be met but the format was still green.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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