+ Reply to Thread
Results 1 to 7 of 7

Formula using colour rather than data?

  1. #1
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Formula using colour rather than data?

    Is it possible to have a xlookup use the colours of the cells father than data?

    so look up in cell A3 the formula would be, lookup A1, if it is pink, then use the colour of the cell in A2.

  2. #2
    Registered User
    Join Date
    09-21-2022
    Location
    Amsterdan
    MS-Off Ver
    MS 365 (PC Version 2209)
    Posts
    66

    Re: Formula using colour rather than data?

    Hi, you could do it with NumberColors. Look at this site https://www.exceldemy.com/excel-form...on-cell-color/.

    From that you can do an IF function.

    For any questions you can contact me.
    Good luck,
    Roy de Mooij

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula using colour rather than data?

    No. There is no built-in function that will tell you cell color. This can be done by writing a custom function using VBA.

    I could help with that but your description could mean more than one thing. XLOOKUP looks up a value in a range. Your description does not give a range. What does "it" refer to in "if it is pink"? Use the color in A2 to do what?

    Can you give a more concrete example of what you are trying to do?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: Formula using colour rather than data?

    Sorry to be more clear it would be

    so look up in cell A3 the formula would be, look at cell A1, if the cell is pink, then use the colour of the cell in A2.

    Is that clearer?

  5. #5
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Formula using colour rather than data?

    Quote Originally Posted by gjjh25 View Post
    Sorry to be more clear it would be

    so look up in cell A3 the formula would be, look at cell A1, if the cell is pink, then use the colour of the cell in A2.

    Is that clearer?
    No, is not.
    There is no function in Excel that evaluates or returns the color of a cell. This can only be done in VBA, but you can attach an example file with some information and settings you have in the original file so we can better understand how things are. That is, whether you get that pink color after a conditional formatting or not. Or is it just the name of the color?
    Without an example file it's hard to guess.
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula using colour rather than data?

    Quote Originally Posted by gjjh25 View Post
    Is that clearer?
    You just repeated exactly the same thing you said in your first post.

    What value do you want to find?
    Want range do you want to look for that value in?
    How do you want to use color to find that value?

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,615

    Re: Formula using colour rather than data?

    Colors are typically used make certain data values stand out; but, you haven't given any hints as to why a cell might be colored. That logic can usually be used as a test in other cells or conditional formatting.
    Or did you do it just because its pretty ...
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula for data bar colour
    By Btas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-10-2019, 11:47 PM
  2. How to change cell colour, if the colour is based on value from formula?
    By darah237 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-19-2016, 11:40 AM
  3. Formula to check colour of text or colour of background
    By Wonderful World in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-07-2014, 01:49 AM
  4. VBA to colour data labels same as line colour - dynamic chart
    By Jabba69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2014, 10:59 AM
  5. Formula to enter data/change the colour of a cell if a file isn't updated
    By alexander.small in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2013, 10:04 PM
  6. Formula to enter data/change the colour of a cell if a file isn't updated
    By alexander.small in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-01-2013, 06:41 AM
  7. [SOLVED] can the fill colour of a bar be tied to the data font colour data
    By PaulC in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-22-2006, 08:25 PM

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