If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Is there a function that can 'find' text within a cell?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-20-06, 05:49
garethleeds garethleeds is offline
Registered User
 
Join Date: Dec 2005
Posts: 5
Is there a function that can 'find' text within a cell?

I have several cells in a column with random text in each.
EG:

Opening Balance 01.01.06
Supplier Payment
Transfer to Euro account X

I would like to group the cells into similar groups eg all payments together, all opening balances together.

I need a formula that can look at a cell to see if it contains the word 'opening' or 'payment' or 'Euro' etc

There are literally hundreds of different entries in the cells so I can't use =IF(cell = "Supplier Payment",....

I need something like IF(cell contains "Payment",....

Any ideas? Thanks
Reply With Quote
  #2 (permalink)  
Old 04-20-06, 06:13
garethleeds garethleeds is offline
Registered User
 
Join Date: Dec 2005
Posts: 5
Found a sort of solution searching the net:

=IF(ISERROR(FIND("Opening",A1))=FALSE,"Opening","" )&IF(ISERROR(FIND("opening",A1))=FALSE,"opening"," ")&IF(ISERROR(FIND("Transfer",A1))=FALSE,"Transfer ","")&IF(ISERROR(FIND("transfer"...

Just not 100% safe as it's case sensitive....
Reply With Quote
  #3 (permalink)  
Old 04-20-06, 10:10
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
What about using a non-formula approach? You can use Data > Text to Columns to parse each word into a column. Choose Delimited in first step, then use Space as the delimiter in second step.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #4 (permalink)  
Old 04-20-06, 10:22
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Another formula approach is to put each qualifier in row 1. For instance, if your cells are in column B, then in C1 put "payment" (without quotes), and in cell C2 put this formula (which is not case sensitive)

=SUM(LEN(B2)-LEN(SUBSTITUTE(UPPER(B2),UPPER(C$1),"")))/LEN(C$1)

Then copy down.

Now if the key term appears in column B, each cell in column C will have a 1, otherwise 0.

Then put another key term in D1, and use this formula (you can just drag to the right as far as needed and down as far as needed, the formula automaticlaly adjusts).

Then you can sort based on Column C, then D, then E, etc.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On