Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bruce
 
Posts: n/a
Default Is there a logical test for a cell's format instead of contents

Microsoft Excel 2003
I have a list of names for a roster in a single column covering several
months. The information is imported from another source (MS Access) which is
maintained by someone else and the only distinction between status (i.e.
rostered, available, unavailable, absent) is the cell format (i.e. colour).
I want to use an IF_statement to identify the different statuses so that I
can produce a summary report.
e.g. I could enter this formula (if there a logical test for a cell's format
instead of contents) in cell B5:
IF(A5 cell colour is blue,"Rostered",IF(A5 cell colour is
green,"Available",IF(A5cell colour is grey,"unavailable","absent")))
I could then use a lookup function to create my summary report.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rowan Drummond
 
Posts: n/a
Default Is there a logical test for a cell's format instead of contents

See the ColorIndex function he
http://xldynamic.com/source/xld.ColourCounter.html

If you copy this to a normal module you can then create a formula
similar to:
=IF(colorindex(A3)=41,"Rostered","other")

Hope this helps
Rowan

Bruce wrote:
Microsoft Excel 2003
I have a list of names for a roster in a single column covering several
months. The information is imported from another source (MS Access) which is
maintained by someone else and the only distinction between status (i.e.
rostered, available, unavailable, absent) is the cell format (i.e. colour).
I want to use an IF_statement to identify the different statuses so that I
can produce a summary report.
e.g. I could enter this formula (if there a logical test for a cell's format
instead of contents) in cell B5:
IF(A5 cell colour is blue,"Rostered",IF(A5 cell colour is
green,"Available",IF(A5cell colour is grey,"unavailable","absent")))
I could then use a lookup function to create my summary report.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Is there a logical test for a cell's format instead of contents

You could insert a very tiny UDF that returns the cells' background color:

Function clr(R As Range) As Integer
With R.Interior
clr = .ColorIndex
End With
End Function

So that if the background color of A1 is red, then =clr(A1) would return 3
______________________________________
Gary's Student


"Bruce" wrote:

Microsoft Excel 2003
I have a list of names for a roster in a single column covering several
months. The information is imported from another source (MS Access) which is
maintained by someone else and the only distinction between status (i.e.
rostered, available, unavailable, absent) is the cell format (i.e. colour).
I want to use an IF_statement to identify the different statuses so that I
can produce a summary report.
e.g. I could enter this formula (if there a logical test for a cell's format
instead of contents) in cell B5:
IF(A5 cell colour is blue,"Rostered",IF(A5 cell colour is
green,"Available",IF(A5cell colour is grey,"unavailable","absent")))
I could then use a lookup function to create my summary report.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Is there a logical test for a cell's format instead of contents

Bruce

Only by using VBA.........User Defined Function

See Chip Pearson's site for info and code.

http://www.cpearson.com/excel/colors.htm


Gord Dibben Excel MVP

On Wed, 16 Nov 2005 16:18:06 -0800, "Bruce"
wrote:

Microsoft Excel 2003
I have a list of names for a roster in a single column covering several
months. The information is imported from another source (MS Access) which is
maintained by someone else and the only distinction between status (i.e.
rostered, available, unavailable, absent) is the cell format (i.e. colour).
I want to use an IF_statement to identify the different statuses so that I
can produce a summary report.
e.g. I could enter this formula (if there a logical test for a cell's format
instead of contents) in cell B5:
IF(A5 cell colour is blue,"Rostered",IF(A5 cell colour is
green,"Available",IF(A5cell colour is grey,"unavailable","absent")))
I could then use a lookup function to create my summary report.


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
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
How do I only calculate cells which have a filled color format? Phillip Bruce Excel Discussion (Misc queries) 1 June 23rd 05 08:07 PM
how do populate empty cells with the contents of populated cells . Jim99 Excel Discussion (Misc queries) 6 April 21st 05 05:44 PM
format cells Alfred Excel Worksheet Functions 2 April 1st 05 03:43 PM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM


All times are GMT +1. The time now is 04:58 PM.

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"