+ Reply to Thread
Results 1 to 5 of 5

conditional formating based on other cell value

  1. #1
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    conditional formating based on other cell value

    hI, i have a spreadsheet with the following:

    Cell C9 contains a dropdown validation box and could contain:
    Volume
    Rate A
    Rate B
    Ratio A

    Dependent on the option chosen, range D9:AM9 changes to show the correponding values based on a vlookup.

    However the format can sometimes be wrong, for example:

    Volume is an integer with no decimal place,
    Rate A is a percentage with 1 decimal place
    Rate B is also percentage with 1 decimal place
    and Ratio A is an integer with 2 decimal places.

    How can i get the format of A9:AM9 to alter depending on the value in
    cell C9?

    All help gratefully received.
    Thanks

  2. #2
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: conditional formating based on other cell value

    it will be easy for us if you attach a sample file with exactly what you want written in desired cells ...........

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: conditional formating based on other cell value

    I hate to suggest simple IF/IF/IF stuff, but I can't think of anything else that isn't a VB solution.

    The sample file shows this formula in action:

    =IF($C9="Volume",INT(D6),IF(OR($C9="Rate A",$C9="Rate B"),TEXT(D6/100,"0.0%"),IF($C9="Ratio A",TEXT(D6,"0.00"))))

    Obviously, you need to insert your VLOOKUP formula into the spots where I simply referred to another cell value (D6).

    Anyway, this gives you an idea, you can adapt from here.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    Re: conditional formating based on other cell value

    thanks for that, the excel function looks like it could work.
    I will give it a go, thanks again.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: conditional formating based on other cell value

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED].




    (Also, use the "scales" icon across from the post dates to leave Feedback, it is appreciated)

+ 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