Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default if based on cell formatting

Is it possible to use if statements based on cell formatting?
For example:
=if(cell is green,1,0)

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default if based on cell formatting

Colour is not possible, you would need some VBA, such as

Function ColorIndex(rng As Range, Optional text as Boolean = False)
If text Then
ColorIndex = rng.Cells(1,1).Font.ColorIndex
Else
ColorIndex = rng.Cells(1,1).Interior.ColoRindex
End If
End Function

and in the worksheet use

=IF(ColorIndex(A1)=5,1,0)


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Matt" wrote in message
ups.com...
Is it possible to use if statements based on cell formatting?
For example:
=if(cell is green,1,0)



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
Conditional Formatting on one cell based on value in another MJatAflac Excel Worksheet Functions 3 November 1st 06 10:29 PM
Formatting the color of a range of cells based on the value of one cell [email protected] Excel Worksheet Functions 3 October 20th 06 07:04 PM
Formatting a cell based on another cells value b o b Excel Discussion (Misc queries) 1 June 16th 06 11:48 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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