+ Reply to Thread
Results 1 to 11 of 11

Value based on colour of the cell

  1. #1
    Registered User
    Join Date
    12-23-2008
    Location
    Chennai,India,Tamilnadu
    Posts
    70

    Question Value based on colour of the cell

    Dear Friends,

    Please refer the enclosed excel sheet for my Query..

    Please help me to solve.

    Regards
    M.Velmurugan
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    Hi,

    You'll need a user defined function to read the colour of the fill.

    Please Login or Register  to view this content.
    This will return a numeric value for the fill colour of the referenced cell when applied thus:

    =FILLCOLOUR(A1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    12-23-2008
    Location
    Chennai,India,Tamilnadu
    Posts
    70
    Pls check the excel file for details i want before replying.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    I have checked the file. As far as I'm aware, without using a UDF such as the one described above, there's no way to test if a cell is filled or not.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Value based on colour of the cell

    Maybe with R as a range:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,534

    Re: Value based on colour of the cell

    Pls check the excel file for details i want before replying.
    Not politically correct

    See attached for something to play with
    Attached Files Attached Files

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Value based on colour of the cell

    Hi Jolivanes,

    Please Login or Register  to view this content.
    works on Format Conditions rendering also!

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,534

    Re: Value based on colour of the cell

    Hi xladept.
    Thank you very much. I never use Conditional Formatting (that is what you mean I think). Don't ask me why because I don't have an answer for that. When you get older you get set in your ways maybe.
    However, according to our friends at Microsoft, that started with Excel 2013. The OP attached an .xls file which makes me believe he/she might work with an older version then 2013.
    I could be totally wrong here and if so, I hope you will let me know without worrying about being politically correct.
    Looking back at it, I should have attached an .xls file also instead of the .xlsm file.
    I guess I'll wait for the reprimand.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Value based on colour of the cell

    Hi Jolivanes,

    No reprimand - did you notice that this was an 8-year old thread. I hate conditional formatting but I just, today, learned how to get the color. And, I'm probably older than thee (March 11,1939).

    BTW - I'm running 2010 and I understand that the code works in 2003 and 2010 but not in 2007

  10. #10
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,534

    Re: Value based on colour of the cell

    Hi xladept
    You've got me on several fronts. Indeed, you've got a couple more years of life experiences and I also did not notice that this was an older thread.
    But, because I did not notice that this was an old thread, the comment of "I guess I'll wait for the reprimand" was meant for the OP so he/she could tell me that he/she was not able to open it.
    All mute now I assume.
    It sounds like you have a similar attitude as I (now) have. We're never too old to learn.
    The machine I am working on has 2007. I do have 2013 on a laptop though.
    Keep on with the instructing though. I sure do appreciate it.
    Thanks and Regards
    John
    John

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Value based on colour of the cell

    Hi John,

    Nice to meet you and thanks and we'll probably be in touch now and then

+ 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