+ Reply to Thread
Results 1 to 7 of 7

ColorIndex

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    11

    ColorIndex

    Hello,

    please can you help me with this small problem?

    I have this function:
    Please Login or Register  to view this content.
    But when I try to get the value of e.g. Yellow color in A1 position, I will ge just error note: VALUE. I thiet different types of formating, but nothing help.

    Thanks
    Robbie88

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: ColorIndex

    Try:
    Please Login or Register  to view this content.
    I tried to highlight ir with red, but it is hardly visible. there is underscore between Cell and Color
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: ColorIndex

    Hello Kaper,

    it works perfectly now!!! Thank you.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: ColorIndex

    PS. see attached file and note that the value does not change when you change color.
    To force change after recalculation (not after color change) one can for instnce use Volatile or such trick as I used in attachment
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-26-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: ColorIndex

    Hello Kaper,

    thank you fir your replay. I checked your code - but it doesn't work correctly in my Excel. When I change the color I have to "recalculate"/"refresh" the cell with code. But it will be nice to do it automatically.

    Thanks

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: ColorIndex

    Changing format does not fire an event in Excel.
    a mere substitute could be in sheet code:
    Please Login or Register  to view this content.
    it works just after you change focus (select another cell) (not directly after formatting change) and is reasonable to use only if there is not too many formulas in the sheet
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-26-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: ColorIndex

    Thank you.

+ 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. [SOLVED] ColorIndex of 56 Colors
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2013, 02:29 AM
  2. ColorIndex row with VBA
    By peakymatt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2010, 03:59 AM
  3. unable to set the ColorIndex
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-15-2010, 02:02 AM
  4. ColorIndex
    By skat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-04-2006, 09:45 PM
  5. ColorIndex Mystery
    By blatkins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2006, 09:55 AM
  6. Can't set font.colorindex from VBA
    By Mike Jamesson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-19-2005, 10:05 AM
  7. Use of Interior.ColorIndex
    By liquidhot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2005, 02:22 PM
  8. colorindex
    By Nell Fahey in forum Excel General
    Replies: 3
    Last Post: 04-28-2005, 03:06 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