Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 271
Default Using cell color as criteria

Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Using cell color as criteria

if range("a1").interior.ColorIndex=3 then msgbox "hi"

--
Don Guillett
SalesAid Software

"Susan" wrote in message
...
Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Using cell color as criteria

Susan,

Before you pursue this, check out Formatting as data (sorting on color, etc.) at
http://www.smokeylake.com/excel/excel_truths.htm.
--
Earl Kiosterud
www.smokeylake.com

Note: The norm in these groups is to top-post.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"Susan" wrote in message
...
Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Using cell color as criteria

Hi Susan,

It looks like you are trying to do this with a spreadsheet function - you
can't, you need to use VBA.

You can either create a custom VBA FUNCTION depending on what you mean by
"do this" or a VBA subroutine, which is what Don is alluding to .
--
Thanks,
Shane Devenshire


"Susan" wrote:

Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 271
Default Using cell color as criteria

Yeah, I didn't think I could do it with a simple spreadsheet function.

Thanks all for responses! I will look into the VBA solution.

"ShaneDevenshire" wrote:

Hi Susan,

It looks like you are trying to do this with a spreadsheet function - you
can't, you need to use VBA.

You can either create a custom VBA FUNCTION depending on what you mean by
"do this" or a VBA subroutine, which is what Don is alluding to .
--
Thanks,
Shane Devenshire


"Susan" wrote:

Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Using cell color as criteria

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
solution

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Susan" wrote in message
...
Hi, I'd like to write a formula with IF function, using a cell color as a
criteria. Is this possible?

Like,
=IF([cell.fill.color]=red,[dothis],[dothat])

Thanks.



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
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Can I color a cell if a certain criteria is met? Nick Excel Discussion (Misc queries) 4 April 12th 06 03:06 PM
Can criteria in countif statement be a color? aosbor Excel Worksheet Functions 1 November 23rd 05 09:17 PM
I am trying to color fill a cell based on specific criteria jglen Excel Discussion (Misc queries) 1 May 27th 05 05:30 PM
color cells when criteria is met Cor Excel Discussion (Misc queries) 2 February 3rd 05 10:38 PM


All times are GMT +1. The time now is 07:04 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"