Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 275
Default conditional format question

Hi,
Cell E14 will contain two sets of numbers
1st set = 1p,10p,20p,30p,£1,£50,£600
2nd set = £1000,£15000,£20000

I want the colour of Cell E14 to be blue, ie
Code:
Selection.Interior.ColorIndex = 41
Selection.Font.ColorIndex = 2

if any of the values is equal to 1st set as above

or

the colour of cell E14 to be red, ie
Code:
Selection.Interior.ColorIndex = 3
Selection.Font.ColorIndex = 2

if any of the values is equal to the 2nd set as above,
Cell E14 will only contain one number at a time from any of the two sets of
numbers.
I just need the cell to be red or blue accordingly depending which number
from which set is chosen
any ideas code/and or formula ??
thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default conditional format question

Hi Anthony

Assuming your 1st set of numbers is held in A1 and your second set in A2

The criteria for setting Blue for cell E14 with CF, would be
=ISNUMBER(FIND(E14,A1))
and for Red would be
=ISNUMBER(FIND(E14,A2))

--
Regards

Roger Govier


"Anthony" wrote in message
...
Hi,
Cell E14 will contain two sets of numbers
1st set = 1p,10p,20p,30p,£1,£50,£600
2nd set = £1000,£15000,£20000

I want the colour of Cell E14 to be blue, ie
Code:
Selection.Interior.ColorIndex = 41
Selection.Font.ColorIndex = 2

if any of the values is equal to 1st set as above

or

the colour of cell E14 to be red, ie
Code:
Selection.Interior.ColorIndex = 3
Selection.Font.ColorIndex = 2

if any of the values is equal to the 2nd set as above,
Cell E14 will only contain one number at a time from any of the two
sets of
numbers.
I just need the cell to be red or blue accordingly depending which
number
from which set is chosen
any ideas code/and or formula ??
thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default conditional format question

Try Conditional Formatting:

Formula is:
=(E14=1000)+(E14=5000)+(E14=20000)0
and pick the red background


Similar for the small coinage

--
Gary''s Student
gsnu200709


"Anthony" wrote:

Hi,
Cell E14 will contain two sets of numbers
1st set = 1p,10p,20p,30p,£1,£50,£600
2nd set = £1000,£15000,£20000

I want the colour of Cell E14 to be blue, ie
Code:
Selection.Interior.ColorIndex = 41
Selection.Font.ColorIndex = 2

if any of the values is equal to 1st set as above

or

the colour of cell E14 to be red, ie
Code:
Selection.Interior.ColorIndex = 3
Selection.Font.ColorIndex = 2

if any of the values is equal to the 2nd set as above,
Cell E14 will only contain one number at a time from any of the two sets of
numbers.
I just need the cell to be red or blue accordingly depending which number
from which set is chosen
any ideas code/and or formula ??
thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 275
Default conditional format question

Roger/Gary
thanks for your suggestions I'm off to try them
cheers
"Roger Govier" wrote:

Hi Anthony

Assuming your 1st set of numbers is held in A1 and your second set in A2

The criteria for setting Blue for cell E14 with CF, would be
=ISNUMBER(FIND(E14,A1))
and for Red would be
=ISNUMBER(FIND(E14,A2))

--
Regards

Roger Govier


"Anthony" wrote in message
...
Hi,
Cell E14 will contain two sets of numbers
1st set = 1p,10p,20p,30p,£1,£50,£600
2nd set = £1000,£15000,£20000

I want the colour of Cell E14 to be blue, ie
Code:
Selection.Interior.ColorIndex = 41
Selection.Font.ColorIndex = 2

if any of the values is equal to 1st set as above

or

the colour of cell E14 to be red, ie
Code:
Selection.Interior.ColorIndex = 3
Selection.Font.ColorIndex = 2

if any of the values is equal to the 2nd set as above,
Cell E14 will only contain one number at a time from any of the two
sets of
numbers.
I just need the cell to be red or blue accordingly depending which
number
from which set is chosen
any ideas code/and or formula ??
thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default conditional format question

Your post is an excellent way to avoid excessive IFs
--
Gary's Student
gsnu200709


"Roger Govier" wrote:

Hi Anthony

Assuming your 1st set of numbers is held in A1 and your second set in A2

The criteria for setting Blue for cell E14 with CF, would be
=ISNUMBER(FIND(E14,A1))
and for Red would be
=ISNUMBER(FIND(E14,A2))

--
Regards

Roger Govier


"Anthony" wrote in message
...
Hi,
Cell E14 will contain two sets of numbers
1st set = 1p,10p,20p,30p,£1,£50,£600
2nd set = £1000,£15000,£20000

I want the colour of Cell E14 to be blue, ie
Code:
Selection.Interior.ColorIndex = 41
Selection.Font.ColorIndex = 2

if any of the values is equal to 1st set as above

or

the colour of cell E14 to be red, ie
Code:
Selection.Interior.ColorIndex = 3
Selection.Font.ColorIndex = 2

if any of the values is equal to the 2nd set as above,
Cell E14 will only contain one number at a time from any of the two
sets of
numbers.
I just need the cell to be red or blue accordingly depending which
number
from which set is chosen
any ideas code/and or formula ??
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
Conditional Format Question Karl Excel Discussion (Misc queries) 5 January 11th 07 11:55 PM
question about conditional format Jack Sons Excel Discussion (Misc queries) 4 October 10th 06 08:12 PM
Conditional format question Richard Excel Discussion (Misc queries) 6 September 30th 06 01:19 AM
Another Conditional format question Corben Excel Worksheet Functions 8 April 28th 06 05:46 PM
Conditional Format Question DougS Excel Worksheet Functions 3 May 3rd 05 01:36 AM


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