Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MMM
 
Posts: n/a
Default Conditional Formatting for Array containing Text

Hi,
I've been trying to tackle this for a long time; will appreciate your help.

My data (text) is in Column B (B3:B13)

G
Y
Y
R
G
G
G
G
Y
G
Y

I want to set the following conditions: If there is even 1 "R" in the array,
return "R" in the cell where I am entering the formula. Then, if there is no
"R", return "Y" if there is even a single "Y", then, if there is no "R" OR
"Y", return "G" if there is even a single "G", then, return "C" if all cells
contain "C", then, if there is no "R", "Y","G" or "C", return N

Hope I've been able to explain this clearly. Thanks in advance for your help.

--
MMM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Conditional Formatting for Array containing Text


Does this do what you want?

=IF(SUM(COUNTIF(B3:B13,{"C","G","Y","R"})),LOOKUP( ROWS(B3:B13)+1,MATCH({"C","G","Y","R"},B3:B13,0),{ "C","G","Y","R"}),"N")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=507489

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Conditional Formatting for Array containing Text

=IF(COUNTIF($B$3:$B$13,"R")0,"R",IF(COUNTIF($B$3: $B$13,"Y")0,"Y",IF(COUNTI
F($B$3:$B$13,"G")0,"G",IF(COUNTIF($B$3:$B$13,"C") =ROWS($B$3:$B$13),"C","N")
)))


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"MMM" wrote in message
...
Hi,
I've been trying to tackle this for a long time; will appreciate your

help.

My data (text) is in Column B (B3:B13)

G
Y
Y
R
G
G
G
G
Y
G
Y

I want to set the following conditions: If there is even 1 "R" in the

array,
return "R" in the cell where I am entering the formula. Then, if there is

no
"R", return "Y" if there is even a single "Y", then, if there is no "R" OR
"Y", return "G" if there is even a single "G", then, return "C" if all

cells
contain "C", then, if there is no "R", "Y","G" or "C", return N

Hope I've been able to explain this clearly. Thanks in advance for your

help.

--
MMM



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MMM
 
Posts: n/a
Default Conditional Formatting for Array containing Text

Thank you daddylonglegs. It worked like a dream.
--
MMM


"daddylonglegs" wrote:


Does this do what you want?

=IF(SUM(COUNTIF(B3:B13,{"C","G","Y","R"})),LOOKUP( ROWS(B3:B13)+1,MATCH({"C","G","Y","R"},B3:B13,0),{ "C","G","Y","R"}),"N")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=507489


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MMM
 
Posts: n/a
Default Conditional Formatting for Array containing Text

Thanks Bob, it worked wonderfully
--
MMM


"Bob Phillips" wrote:

=IF(COUNTIF($B$3:$B$13,"R")0,"R",IF(COUNTIF($B$3: $B$13,"Y")0,"Y",IF(COUNTI
F($B$3:$B$13,"G")0,"G",IF(COUNTIF($B$3:$B$13,"C") =ROWS($B$3:$B$13),"C","N")
)))


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"MMM" wrote in message
...
Hi,
I've been trying to tackle this for a long time; will appreciate your

help.

My data (text) is in Column B (B3:B13)

G
Y
Y
R
G
G
G
G
Y
G
Y

I want to set the following conditions: If there is even 1 "R" in the

array,
return "R" in the cell where I am entering the formula. Then, if there is

no
"R", return "Y" if there is even a single "Y", then, if there is no "R" OR
"Y", return "G" if there is even a single "G", then, return "C" if all

cells
contain "C", then, if there is no "R", "Y","G" or "C", return N

Hope I've been able to explain this clearly. Thanks in advance for your

help.

--
MMM




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
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
How do I apply conditional formatting to a text box barneshere Excel Worksheet Functions 1 May 27th 05 06:26 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM
conditional formatting conflict? Abi Excel Worksheet Functions 2 January 11th 05 03:41 PM


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