Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Conditional Formatting Question

Hi All,

How do I do the following?

If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.

Thanks
Gary



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Conditional Formatting Question

You can not reference other worksheets in conditional formatting.
You may use the formula to return your result first and then perform
conditional formatting on that cell.

=IF(AND(OR(Sheet1!A1="A",Sheet1!A1="B",Sheet1!A1=" C",Sheet1!A1="D"),Sheet2!A1="X"),"Match","No
Match")

HTH,
Paul


"Gary" wrote in message
...
Hi All,

How do I do the following?

If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.

Thanks
Gary





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default Conditional Formatting Question

Gary

You can't base conditional formatting in one worksheet on a value in
another worksheet unless, you are basing it on a named range. If you
give cell A1 in Sheet2 a name, say "test", then apply the following
two conditionsfto the ormat to cell A1 in Sheet1:

=AND(OR($A$1="A",$A$1="B",$A$1="C",$A$1="D"),test= "X")
=AND($A$1="E",test="Y")

I think you should get what you want. You can probably simpify the
one with the OR a little bit.

Good luck.

Ken
Norfolk, Va


On May 7, 5:36 pm, "Gary" wrote:
Hi All,

How do I do the following?

If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.

Thanks
Gary



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Conditional Formatting Question

Ho do I name a cell?


wrote in message
oups.com...
Gary

You can't base conditional formatting in one worksheet on a value in
another worksheet unless, you are basing it on a named range. If you
give cell A1 in Sheet2 a name, say "test", then apply the following
two conditionsfto the ormat to cell A1 in Sheet1:

=AND(OR($A$1="A",$A$1="B",$A$1="C",$A$1="D"),test= "X")
=AND($A$1="E",test="Y")

I think you should get what you want. You can probably simpify the
one with the OR a little bit.

Good luck.

Ken
Norfolk, Va


On May 7, 5:36 pm, "Gary" wrote:
Hi All,

How do I do the following?

If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in
Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.

Thanks
Gary





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default Conditional Formatting Question

Select the cell, then click Insert then Name, then define, then type
in the name you want. If you name cell A1 of sheet2 "test", then you
can type in "test" in a formula, or conditional format condition, or
pretty much anywhere you would previously have had sheet2!a1 and it
will be pretty much the same.



On May 7, 6:11 pm, "Gary" wrote:
Ho do I name a cell?

wrote in message

oups.com...



Gary


You can't base conditional formatting in one worksheet on a value in
another worksheet unless, you are basing it on a named range. If you
give cell A1 in Sheet2 a name, say "test", then apply the following
two conditionsfto the ormat to cell A1 in Sheet1:


=AND(OR($A$1="A",$A$1="B",$A$1="C",$A$1="D"),test= "X")
=AND($A$1="E",test="Y")


I think you should get what you want. You can probably simpify the
one with the OR a little bit.


Good luck.


Ken
Norfolk, Va


On May 7, 5:36 pm, "Gary" wrote:
Hi All,


How do I do the following?


If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in
Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.


Thanks
Gary- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Conditional Formatting Question

Thanks a ton Ken.

wrote in message
ps.com...
Select the cell, then click Insert then Name, then define, then type
in the name you want. If you name cell A1 of sheet2 "test", then you
can type in "test" in a formula, or conditional format condition, or
pretty much anywhere you would previously have had sheet2!a1 and it
will be pretty much the same.



On May 7, 6:11 pm, "Gary" wrote:
Ho do I name a cell?

wrote in message

oups.com...



Gary


You can't base conditional formatting in one worksheet on a value in
another worksheet unless, you are basing it on a named range. If you
give cell A1 in Sheet2 a name, say "test", then apply the following
two conditionsfto the ormat to cell A1 in Sheet1:


=AND(OR($A$1="A",$A$1="B",$A$1="C",$A$1="D"),test= "X")
=AND($A$1="E",test="Y")


I think you should get what you want. You can probably simpify the
one with the OR a little bit.


Good luck.


Ken
Norfolk, Va


On May 7, 5:36 pm, "Gary" wrote:
Hi All,


How do I do the following?


If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in
Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.


Thanks
Gary- Hide quoted text -


- Show quoted text -





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Conditional Formatting Question

In Sheet 2
A1: =IF(OR(Sheet1!A1={"A","B","C","D"}),"X",IF(Sheet1! A1="E","Y",""))

In Sheet 1
select A1
Conditional Formatting
Formula Is: =OR($A$1="A",$A$1="B",$A$1="C",$A$1="D",$A$1="E")
format cell as Red



"Gary" wrote:

Hi All,

How do I do the following?

If A1 in Sheet1 = A or B or C or D and A1 in Sheet2 = X then A1 in Sheet1
should be red. but if A1 in Sheet1 = E and A1 in Sheet2 = Y then A1 in
Sheet1 should be red.

Thanks
Gary




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 question Little pete Excel Worksheet Functions 0 January 23rd 07 04:37 PM
Conditional Formatting question Helen Holubowicz Excel Worksheet Functions 8 January 3rd 07 11:34 AM
Conditional formatting question SGT Buckeye Excel Discussion (Misc queries) 3 August 30th 06 04:36 PM
Another Conditional Formatting Question 1320_Life Excel Worksheet Functions 4 July 22nd 06 10:05 PM
Conditional formatting question Carl Imthurn Excel Worksheet Functions 4 August 8th 05 11:06 PM


All times are GMT +1. The time now is 02:55 PM.

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"