#1   Report Post  
Posted to microsoft.public.excel.misc
Becks
 
Posts: n/a
Default Coloured Cells

Is it possible to use a formula to return a value of True if a cell you refer
to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
then I want a cell in Sheet2 to return P for paid, if not stay blank?

Thanx

Becks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Coloured Cells

If you are willing to use a small UDF, then you can test for color. Enter
this UDF:

Function IsRed(r As Range) As Integer
IsRed = 0
If r.Interior.ColorIndex = 3 Then
IsRed = 1
End If
End Function

Then in A1 in Sheet2 enter:

=IF(IsRed(Sheet1!A1)=1,"P","")
--
Gary's Student


"Becks" wrote:

Is it possible to use a formula to return a value of True if a cell you refer
to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
then I want a cell in Sheet2 to return P for paid, if not stay blank?

Thanx

Becks

  #3   Report Post  
Posted to microsoft.public.excel.misc
Becks
 
Posts: n/a
Default Coloured Cells

How do I enter the UDF? I've never used them before.

Thanks

"Gary''s Student" wrote:

If you are willing to use a small UDF, then you can test for color. Enter
this UDF:

Function IsRed(r As Range) As Integer
IsRed = 0
If r.Interior.ColorIndex = 3 Then
IsRed = 1
End If
End Function

Then in A1 in Sheet2 enter:

=IF(IsRed(Sheet1!A1)=1,"P","")
--
Gary's Student


"Becks" wrote:

Is it possible to use a formula to return a value of True if a cell you refer
to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
then I want a cell in Sheet2 to return P for paid, if not stay blank?

Thanx

Becks

  #4   Report Post  
Posted to microsoft.public.excel.misc
Becks
 
Posts: n/a
Default Coloured Cells

I have entered the UDF, and it works initially. But if the colour is cleared
or added later the formula doesn't update?

"Becks" wrote:

How do I enter the UDF? I've never used them before.

Thanks

"Gary''s Student" wrote:

If you are willing to use a small UDF, then you can test for color. Enter
this UDF:

Function IsRed(r As Range) As Integer
IsRed = 0
If r.Interior.ColorIndex = 3 Then
IsRed = 1
End If
End Function

Then in A1 in Sheet2 enter:

=IF(IsRed(Sheet1!A1)=1,"P","")
--
Gary's Student


"Becks" wrote:

Is it possible to use a formula to return a value of True if a cell you refer
to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
then I want a cell in Sheet2 to return P for paid, if not stay blank?

Thanx

Becks

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
how do i protect cells in a shared worksheet Debi Excel Discussion (Misc queries) 3 September 30th 05 11:15 PM
Conditional formatting...cont. from 9/25 Guenzak Excel Discussion (Misc queries) 4 September 26th 05 10:55 PM
how do i sought coloured number cells from normal ones? sjb1981 Excel Discussion (Misc queries) 1 April 1st 05 02:49 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


All times are GMT +1. The time now is 02:07 AM.

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

About Us

"It's about Microsoft Excel"