Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem - Filter based on color?

Hey,

In fact i'm looking for an "inverse" conditional format?

I have a huge price list, and changes in price are marked in red.
What I want is a second column next to the price column that has a
formula that put's a "1" if the price is changed (marked red) and "0"
if the price is unchanged...

Any ideas? Thx in advance.

Marc.


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Problem - Filter based on color?

Hi Marc

first you have to use a UDF which returns the colorindex of a cell (for
more information see http://www.cpearson.com/excel/colors.htm from
which the following code is pasted):
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the Interior
' (background) of a cell, or, if OfText is true, of the Font in the
cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1,1).Font.ColorIndex
Else
CellColorIndex = InRange(1,1).Interior.ColorIndex
End If
End Function

Now put the following formula in the secon column:
=IF(CellColorIndex(A1)=[code for your color],1,0)

HTH
Frank

Hey,

In fact i'm looking for an "inverse" conditional format?

I have a huge price list, and changes in price are marked in red.
What I want is a second column next to the price column that has a
formula that put's a "1" if the price is changed (marked red) and "0"
if the price is unchanged...

Any ideas? Thx in advance.

Marc.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem - Filter based on color?

Thanks Frank, this was all the info I needed :)

Marc.


---
Message posted from http://www.ExcelForum.com/

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 filter the cells based in Fill color? Ravi Excel Discussion (Misc queries) 2 April 28th 10 12:47 PM
Couting based on color and Filter Aslam Excel Worksheet Functions 1 June 25th 08 05:30 PM
Change tab color based on current color of a cell MarkT Excel Discussion (Misc queries) 0 May 22nd 08 05:46 PM
Advance Filter can be based on cell Color in Microsoft Excel Prateek Singhal New Users to Excel 2 August 23rd 07 04:38 AM
How do I filter based on color in Excel? Howieben Excel Worksheet Functions 1 June 28th 05 01:28 PM


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