Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to return the color of a cell

Dear Sir

how to return the color code of a cell using excel formulas "not VBA
macros".i mean
if i have two cells and i need to know the color code of the two cells
(light yellow or yellow or red or even the color index of them)

i will appreciate if you reply to me ASAP

thanks & Best regrads
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default How to return the color of a cell

Not possible using Formula. VBA easy, you could use a VBA function?

The closest is if the color is being set by a conditional format, then
indirectly you could get the color knowing the condition, but I suspect that
is not what you want.



--

Regards,
Nigel




wrote in message
...
Dear Sir

how to return the color code of a cell using excel formulas "not VBA
macros".i mean
if i have two cells and i need to know the color code of the two cells
(light yellow or yellow or red or even the color index of them)

i will appreciate if you reply to me ASAP

thanks & Best regrads


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to return the color of a cell

As Nigel says there are no built in formulas to return cell formats, though
you could use an old XL4macro in a Named formula

Assuming you will always want to refer to a cell one to the left in same
row, start by selecting cell B1

Define this name Ctrl-F3
Name: ForeColor
RefersTo: =GET.CELL(38,A1)

In any cell one to the right of whose interior colorindex you want to return
enter
=ForeColor

Will return 1-56 or 0 if no fill.

It will not automatically update if you reformat, press Ctrl-Alt-F9 to
recalc.

Regards,
Peter T


wrote in message
...
Dear Sir

how to return the color code of a cell using excel formulas "not VBA
macros".i mean
if i have two cells and i need to know the color code of the two cells
(light yellow or yellow or red or even the color index of them)

i will appreciate if you reply to me ASAP

thanks & Best regrads



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to return the color of a cell

As Nigel says there are no built in formulas to return cell formats, though
you could use an old XL4macro in a Named formula

Assuming you will always want to refer to a cell one to the left in same
row, start by selecting cell B1

Define this name Ctrl-F3
Name: ForeColor
RefersTo: =GET.CELL(38,A1)

In any cell one to the right of whose interior colorindex you want to return
enter
=ForeColor

Will return 1-56 or 0 if no fill.

It will not automatically update if you reformat, press Ctrl-Alt-F9 to
recalc.

Regards,
Peter T


wrote in message
...
Dear Sir

how to return the color code of a cell using excel formulas "not VBA
macros".i mean
if i have two cells and i need to know the color code of the two cells
(light yellow or yellow or red or even the color index of them)

i will appreciate if you reply to me ASAP

thanks & Best regrads



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return the color of a cell Woodi2 Excel Worksheet Functions 1 February 10th 08 05:36 PM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
How can I return a color instead of a value using the function "if Antonio Excel Discussion (Misc queries) 2 January 9th 07 07:32 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Change a cell's color based on return value of a formula Gee-off Excel Programming 4 December 4th 05 02:02 PM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"