LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Difficult Formula

Hi,

I am trying to check two cells for text and then display some other text in
a destination cell using if(countif...

It works quite well except for my having 8 values to check for and only 7
possible IF functions. Here is what I am trying to do:

If b5 or c5 contain the text "aaa", then set "aaa" in d5
If b5 or c5 contain the text "bbb", then set "aaa" in d5
If b5 or c5 contain the text "ccc", then set "ccc" in d5
If b5 or c5 contain the text "ddd", then set "ddd" in d5
and so on to "hhh"

You can see that I want the same destination text for the first two possible
source texts, but then go on one for one for the rest of the source texts.

Here is the formula (placed in d5) I am using, which again works quite well
except for hitting the 7 IF limit.

=IF(COUNTIF(B5:C5,"*aaa*")0,"aaa",IF(COUNTIF(B5:C 5,"*bbb*")0,"aaa",IF(COUNTIF(B5:C5,"*ccc*")0,"cc c",IF(COUNTIF(B5:C5,"*ddd*")0,"ddd",IF(COUNTIF(B5 :C5,"*eee*")0,"eee",IF(COUNTIF(B5:C5,"fff*")0,"f ff",IF(COUNTIF(B5:C5,"*ggg*")0,"ggg","Other"))))) ))

I have received help here before in using a List and ISNUMBER in place of
COUNTIF, but do not know how to make this function change the value of the
text (set destination cell to aaa if source cells contain either aaa or bbb).

I have also used VLOOKUP previously, but the source cells my current case do
not solely contain the text I am searching, so do not think VLOOKUP is the
right solution.

Can anyone help with this? Apologies for the long post, but I wanted to get
all of the relevant information in.

Thanks,

Tom
 
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
Difficult Formula Mike Excel Worksheet Functions 2 November 21st 06 11:21 PM
Difficult Formula Cindy Excel Worksheet Functions 2 March 9th 06 10:26 PM
Difficult (at least to me) formula question darkwood Excel Worksheet Functions 5 December 29th 05 01:39 PM
Difficult look up formula Alex Excel Worksheet Functions 4 June 24th 05 09:28 PM
Difficult (for me) formula/UDF calculation Mike Echo Excel Worksheet Functions 4 December 25th 04 09:09 AM


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