Searching For Multiple Text Strings?

Aug 12, 2014

I want to search a longer text field for a shorter string that may be within it. However, I want to do this for multiple short strings.

For instance:

PhraseHidden word
Please search the text for the hidden message: Blue
The hidden word, Green, may be at any point
And the word may be different lengths like Yellow

I have a table of the hidden words (Blue, Green, Yellow, Pink)

I know I could use search to find one word, but is there a way to look for multiple words, and return the value of which one it finds? I have many hidden words (and the list is dynamic) so I don't want to just split into multiple searches.

View 5 Replies


ADVERTISEMENT

Searching For Codes In Text Strings

Apr 26, 2006

field b831 B831 write AASLQ0300000l;

PCPACIMTAAABl [B29 ]

field B7 b7 ;
field a8 @latestdate("PCP2EHSEAAAAh", jEnd);
field b8 @if(a8 <jStart, @latest("PCP2EHSEAAAAh", jEnd),
@avg("PCP2EHSEAAAAh", jStart, jEnd));
--------------------------------------------------------

I want to look through this text and copy out any 13 character codes that
are present (e.g. "PCPACIMTAAABl" ,2 "PCP2EHSEAAAAh").

These codes all share the following characteristics,

1) they are all 13 characters in length
2) the last character in the code is always either a "l", "h" or a "c".
3) they contrain no spaces
4) the first 12 characters are always in CAPS (followed by a lower "l", "h"
or a "c".

View 9 Replies View Related

Searching Names In Text Strings

Oct 22, 2013

I receive a spreadsheet with over 400 lines of data every month. One row (J) contains information from companies with account details. The problem is that the info uses different formats, so the data strings within the cells can be quite long (sometimes over 100 characters, including spaces, dashes and slashes). The one identifier within each data string is a name, usually somewhere in the middle.

So for example a reference to JOHN SMITH might be "123456-01-smith/john-01/01/10-London-Edinburgh" or "2010-01-01-123456/SMITHJOHNMR/123456". I have a list of names (Column Y) and what I need is some way (probably VBA) for Excel to look down the list of references and compare them to the list of names, and if one of the names appears anywhere with in a text string, to put the name in column K. So if 4546/JohnSmith-01/08/13 or Leeds-London-123SmithJohn789 appears, put John Smith in column K, if 0123-MrFredBlogs-0321-5 appears, put Fred Bolggs in column K.

View 6 Replies View Related

Searching Irregular Strings

May 1, 2007

I am trying to parse stock holdings for certain companies but I am running into trouble because they are not uniform in their form. The data has a general form but each company uses a slightly different style for the forms. These differences are hamstringing my efforts to effectively parse the data. I have attempted to parse the data using the split function to get it into a more manageable form, and then use various comparisons to tease out the right information. This, however, has not panned out like I hoped. Below are some sample data forms and some of my (albeit poorly written and structured) VBA to try and solve the problem.........

I am trying to extract the same fields from each, such as name or number of shares:

3COM CORP 885535104 1,700,000
Prudential Financial, Inc. 432848109 100,000
this would be a desired output.

here is some of my code to try and accomplish this. this seems to work the data if it is formatted correctly, but I would like write a general parser, and this is what I am struggling with. I cannot figure out how to write something that will correclty parse these irregular strings.

txt = ActiveCell.Value
x = Split(txt, " ")
name = ""
cusip = ""
shrs = "".....................

View 2 Replies View Related

Excel 2011 :: Find Multiple Text Strings In Another Text String

Mar 8, 2013

How do I use an Excel formula to find which (if any) multiple sets, each of up to 50 words, exist in a series of rows of a spreadsheet - if set A has one or more words found in a searched cell.

A positive result will return a specific value in the designated result cell. If none of the words in Set A is found in the searched cell, the formulae will repeat the test for the words in Set B, and so on.

After all 50 sets of words have been tested, the formula will move to the next cell in the searched column.

New words will be added to the sets of words continually as required.

Multiple words within sets are included in double quotes. Within each set of words there will be some n-tuples of words (i.e. 24 adjacent words) that contain one or more of the words in the set, but for which the formula will be required to return a negative result. Example: Set A = word 1, word2, word 3, "word1 word2 word3". (The words within a set could also be each entered in separate columns, as opposed to all included in a single cell.) The single column of text to be searched is about 10,000 rows.

I am wanting to use the above in a spreadsheet that contains data downloaded from a series of bank accounts to automatically allocate items of expenditure to one of 20 or so different categories of expenditure.

The formula will search the description field to find words that are used in the in the downloaded files from the various accounts to describe each transaction.

If a word describing travel expenditure (e.g. hotel, "holiday inn" but not "holiday travel") is found in the description of an expenditure item - the item cost will be allocated to the TRAVEL EXPENDITURE column, which is one of 20 or so different categories of expenditure.

Happy to consider a different solution if the task can be done better a different way.

Tried using a combination of INDEX/SEARCH/IF in Excel, but was not able to get a correct result. PS I am using Excel 2011 for Mac - which does not allow macros, so the solution needs to be entirely formula based.

View 1 Replies View Related

Search For Multiple Text Strings In A Cell - Return One Of Multiple Corresponding But Different String

Mar 11, 2014

I have a spreadsheet with 1,000 rows of data.

Each Cell in Column A has a different long text string.

I need to see which (if any) of 10 specific small text strings exist within each long text string. Depending on which small text string is found I want to return a 3 digit code. If no small text string is found I want to return "Not Found"

E.g.:
- Cell A2 contains "randomtext,randomtext,APPLE,randomntext"
- I want to see if Cell A2 contains any of the words APPLE, ORANGE, CARROT.
- I want to return "APP", "ORG", "CAR" or "Not Found"

Q: What is the most elegant way to accomplish this within a single formula that I could paste into each cell in Column B?

View 2 Replies View Related

Extract Multiple Text Strings From A Long Text String

Sep 4, 2009

An original text string entry appearing in an Excel cell would be:

"N7C Neuroprotective J5Z Antiviral, other M2Z Antiarthritic, other J5A Antiviral, anti-HIV"

I need to extract N7C, J5Z, M2Z and J5A from this string and list these alphanumeric values in separate cells adjacent to the original text string. The challenge is that these alphanumeric references may appear in different positions within the original string with no fixed value e.g. a "," separating them. The alphanumeric references may also be 3 or 4 characters in length and there may be different numbers of alphanumeric references in the original string.

Another example would be (very different from the first):

"T2Z Recombinant, other K5B Radio-chemoprotective J3Z Antibacterial, other D3A Vulnerary A10C Symptomatic antidiabetic K6Z Anticancer, other R8A Antiasthma B6A Septic shock treatment I1Z Immunostimulant, other S1Z Ophthalmological R8B Antiallergic, non-asthma M1A1 Anti-inflammatory"

You can see that in this further example "A10C" & "M1A1" are 4 character alphanumeric strings wheras the others feature 3 characters.

View 9 Replies View Related

Searching For Certain Strings And Incrementing Counters

Aug 4, 2009

What I would like to have done is to look for each cell in column M with only the string of "note" in it, then look one cell below and to search the text using boolean operators and if certain words are found, increment a series of counters.

For example, using cells M16 and M17 as references, if "please" AND "relationship" AND "customer" are found within the text, create a counter and increment it by 1. The program should loop through all of the cells in column M and determine how many instances of that particular set of words is found. If there are 20 instances in the column then somewhere on the sheet, counter 1 should indicate 20.

There are a couple other set of words I would like to search as well, with each new set creating a new counter and indicating the total instances found of that particular set of words. For example, in cells M40 and M41 I would like to search for "failing" AND "name" AND ("first" OR "last"). Thus, if there were 50 of these instances a second counter somewhere on the sheet would indicate the number 50 when the program finishes.

I was using the find and replace but I don't think I can use boolean operators with it, and I'd also like to learn how to do this programmatically.

View 4 Replies View Related

Search For Multiple Text Strings Within Multiple Phrases

Feb 4, 2012

I want to search all the terms Column B within all the text phrases in Column A. I am ok if the words do not match the case sensitivity as I can address that myself.

If the exact phrase match is found, return the value True or False.

Column A
A1:Dog likes to run
A2: Cat Red-tummy-01

[Code]....

View 9 Replies View Related

Searching A Cell For Mulitiple Strings And Returning A Value

Sep 12, 2008

I am trying to search a cell for multiple different strings and if the string is found, multiply a nearby cell by a factor of 1.5. if the strings are not found i want the original cell value to be used. I have tried using find functions but they do not seem to work. I have also tried using nested if functions with no luck..

View 9 Replies View Related

Searching For Specific Text Across Multiple Columns In A Sheet

Sep 25, 2013

If I'm using this function to find the specific text "EXPIRED" in the specified cells, how can I add additional cell ranges on the same sheet to this function?

D17:D34 as well as F17:F34

=IF(ISERROR(MATCH("EXPIRED",Homepage!D17:D34,FALSE)),?"OK","ALERTS")

View 2 Replies View Related

Extract Multiple Pieces Of Text Between Two Strings

Feb 11, 2014

In column E of row 1 I have one column with a long line of text containing information in that should be separated into cells for the following fields:

Year, make, model, drive, part, name, phone, text, email, location, notes, stream, date/time, disclaimer

Here is an example of the text in column E:

Year: 2001 Make: Nasa Model: big spaceship Drive:
Automatic 2 Wheel Drive Spaceship:
4 12.7 Liter ----------------------------- Part: Hood -----------------------------

[Code] .........

The data in each field can be different lengths, and I would like to take pieces of text out of Column E, and put it in other columns in the row.

Each field has its own column, and I would like to copy the data for that field from the column containing all data to its respective column.

=MID(E1,SEARCH("Year:",E1)+5,SEARCH("Make:",E1)-SEARCH("object",E1)+5)

The formula above was inspired by an "extract text between two strings" post, but will not work.

I tried to make a formula that would extract everything between the strings "Notes:" and "Team Stream:" or for example, so I could get the result "Thank you for using our excel forum! thesmartestpeopleever.com" or "Year" and "Make" so I could get the result "2001" if using the example above. I was not able to do it.

I have attached a sample photo and an excel file.

How do I separate/extract each columns data to the appropriate column?

Attached Image : excel string pic.jpg‎

Attached File : excel string formula conundrum.xlsx‎

View 2 Replies View Related

IF And FIND Statement For Multiple Text Strings

Nov 19, 2009

I have been given a huge membership list. The field for the CITY also as the two letter state abbreviation (e.g., "Fremont, CA" instead of just "Fremont".). I want to be able to have the "CA" or "WA" or "NV" (etc) from the city field appear in a new STATE field. I successfully use the below statement to do this with the "CA" but I want a statement that will search for multiple strings (the other states).
Here is what works now: =IF(FIND(" CA",F2),"CA"). But I want to be able to add other state abbreviations to this.

View 4 Replies View Related

Concatenate Multiple Strings Of Text With Formatting

Aug 20, 2013

I am trying to concatenate multiple strings of text where each may have composite or compound formatting. Is there any way to maintain the formatting? The Characters.Insert method won't work because the resulting string is greater than 255 characters. See an example below.

String 1: When you simply concatenate
String 2: these strings, Excel discards
String 3: formatting at the character level.

Required Result: When you simply concatenate these strings, Excel discards formatting at the character level.

View 5 Replies View Related

Macro - Select Multiple Cells By Searching For Specific Text

Nov 8, 2013

I would like to select all cells in column A that begin with the text "SP". Some cells will be contiguous but others will not. For instance in one case, I would like the macro to select cells with the text "SP" which would result in cells A1, A2, A3, A10, A15 being selected. I am working on building a macro that will then do other things to these cells/rows so this is the first step.

The below code will select the first cell with "SP". How would I alter this code to only search Column A and select multiple cells? or totally different code.

Code:
Sub test()
Dim r As RangeSet
r = Cells.Find(what:="SP", LookIn:=xlValues, lookat:=xlWhole)
If Not r Is Nothing Then r.Select
End Sub

View 7 Replies View Related

Excel 2010 :: Return Multiple Text Strings From Other Worksheet

Mar 7, 2014

I need a formula or array to perform the following in Excel 2010:

I have 2 worksheets "Master Report" and "Free text comments". The master report will be shaed with individuals but the Free Text comments worksheet will not.

sample feedback report.xlsx

In cells D2 downwards on the "Master Report" I want to show the individual feedback comments from the "Free Text comments" worksheet that have been made by other people for the individual named in cell A2 on the "Master Report" worksheet. So on James' master report it would show the 8 individual comments listed for him on the Free text comments" worksheet.

I have searched the internet and tried various combos of lookups, IFs, index and match but have not come across the right formula yet.

View 1 Replies View Related

Count Amount Of Cells Within Range That Contain Multiple Strings Of Text

Apr 22, 2013

I'm trying to build a formula that counts the amount of cells within a range that contain multiple strings of text within the same cell. I only know how to build a formula that snags cells that contain 1 but not 2 different ones within the same cell. For example: I want to count cells if they have the word BALL and STICK somewhere in the cell....see three cell examples below

gameballnetstick
ballgame
stick ball
tenballs
green stick

Of the three examples: it would only count cells: gameballnetstick and stickball

View 2 Replies View Related

Search For Multiple Text Strings Simultaneously In Single Cell?

May 23, 2013

I have a spreadsheet that has relatively clean data, but at the end of every row is a long notes fields (often filled with several paragraphs of text). I'm trying to search inside each one of those notes to see if it contains certain boilerplate language / legalese / key words.

If I was just looking for one word, it would be easy -- I would write =IFERROR(IF(SEARCH("keyword",E2)>0,"Yes",""),""). That way, if the keyword is present, it returns "Yes", and if it's not present, it returns a blank.

What I want to do, though, if look for a long list of keywords simultaneously, and if ANY of those keywords are present, have it return a "Yes".

So I could do something like =IFERROR(IF(or(SEARCH("keyword1",E2)>0,SEARCH("keyword2",E2)>0,SEARCH("keyword3",E2)>0,SEARCH("keyword4",E2)>0)),"Yes",""),""), but that seems horribly inefficient. Especially since my list of keywords is likely to change over time.

So what I want it to do is search each cell by simultaneous reference to an ever-changing table of keywords (call it [KeywordTable]). And I can't figure out how to do that. The search function is resisting all of my efforts to put multiple search values / a range of words inside of it.

To reiterate: the goal is to look at one cell filled with text, ask "does the text in that cell contain any of the keywords contained in [KeywordTable]", and if the answer is "Yes" return yes, and if the answer is no return no (or blanks).

View 7 Replies View Related

Count Number Of Occurrences Of Multiple Strings In Two Text Files

Jun 11, 2014

In Column A I have the list of strings that I need to search. I want to count the number of occurrences of these strings inside these two text files: Sample1.txt and Sample2.txt. For example I have the string "DOG". I want to search and count the number of times this string appeared in Sample1.txt, and Sample2.txt

See below:

View 5 Replies View Related

VBA - Search For Multiple Text Strings In Data Field And If Matched Return One Word

May 7, 2014

I have hundreds of records of customer info and I am trying to categorize the job titles so that I can conduct some analysis with a pivot table. My problem is that there is about 20 different ways and variations of "manager" so Instead of autofiltering for "mrg." "Manager" "marketing manager" ect. and then replacing the text manually and using the enter and fill process (to create some standardization to compare "manager" to "director" to "c-level" to "consultant", etc.) and repeating this process over and over again...

I would like to create a VBA that would search the column "job title" for multiple text strings at once and if the text string was true in the cell then the cell would be replaced by a new text string "Manager". I was thinking a series of if functions within one vba but I am not sure if this is possible.

View 8 Replies View Related

Excel 2003 :: Concatenate Text Strings From Column Using Multiple Criteria Condition (formula)

Dec 20, 2012

I am looking for a way of creating the following conditioned concatenation.

I have two tables, let's call them "summary" and "detailed".

The "detailed" table is something like the following:

ID
VOL

001
01

001
05

[code]....

The "summary" table below gets info from the "detailed" table. The 'ID'is now unique. I'm looking for a formula on the 'VOL (concatenated)' column cells it should get all rows from the "detailed" table with the same ID and then concatenate the 'VOL' column results, comma separated:

ID (unique)
VOL (concatenated)

001
V01, V03, V05

002
V01, V04

003
V06

PS: I have people using this table with office 2003, so compatibility is necessary...

View 1 Replies View Related

Compare Text Strings In Two Columns And Return Text From Adjacent Cell

Feb 28, 2013

how to Chk the text string in particular cell, compare it with a super set column and get the full from of the text string from another corresponsing column and the output will be corresponsing full form of the chked text string?

View 6 Replies View Related

Lookup Part Text In Range In Cells Holding Text Strings

Sep 27, 2006

I try to write the function that gets some "ref" and returns appropriate item.
For example: if I give to function "C3", it returns "AAA"
if I give to function "R18", it returns "BBB" (cause it between R15 to R26)
if I give to function "R9", it returns "BBB" also.

View 9 Replies View Related

Editing Using VBA - Find Text Strings In Text File

Dec 7, 2012

I have a large .txt file that I would like to edit using VBA. What I would like to do is to find each of the following text strings in the text file :

De:
De :
Envoye
A:
Objet:

If the character right before those text strings is not a carriage return (chr(13) then add a carriage return.

I would like the code to read each line in the text file and execute the task mentioned above.

View 9 Replies View Related

Extracting Strings Of Text From Columns Of Data(text)

Apr 23, 2007

What I have is a column of data(text) which contains amongst all the text three strings of text in ever cell in the column which I require copying into three adjoining cells

The data I require is :-

(a) The persons name which is always after the word ‘Requester’ e.g. Requester Steve Robinson

(b) Their office location which is directly after the persons name and is in brackets e.g. (Newcastle User)

(c) The Approving persons name which is preceded by ‘Approved by’ e.g. Approved by Christine Hunting

See examples 1 & 2 below

Example 1

CR0/CRZ3651 Requestor Steve Robinson (Newcastle User) Tel: 01234 798157 Approved by Christine Hunting

Please install and configure 2 Ultra 2s (typhoon and lancaster) for use as ARTE workstations. These workstations require Solaris 2.5.1 plus the same patches as before

Example 2

CR0/CRZ3118 Requestor Doug Cunningham (Newport User) Tel: 0114 9881480 Approved by John Smithers

Please provide support to set up Cisco 2691 Router and PIX-506E Firewall to enable external connection of a remote terminal for project work.

As you will appreciate the text in the cells is of non standard lenght and the three pieces of information can be located virtually any where in the text

View 9 Replies View Related

Searching Through A Worksheet For Text Or Value Entered In A Text Box

May 26, 2005

I am trying to search through an excel worksheet using the code below. I have a Form containg a text boxes and a command button (SearchTxt, FindCmd). The VBA program is able to search through XL but (1) It does not set the next value or text in a the worksheet active

(2) It only finds a value or text as an entire cell and not as a set of characters in a cell.

I tried to use Cells.Find method that solves the above problems, but i get an error message-Object variable not set (91) .

Private Sub FindCmd_Click()
Dim Rng1 As Variant

If SearchTxt.Text = "" Then
MsgBox "Please enter Vendor Number.", vbOKOnly, "Error"
End If

Set Rng1 = Range("A1:F10000").Find(what:=SearchTxt.Text, Lookat:=xlWhole, _
LookIn:=xlValues, SearchDirection:=xlNext)
If Rng1 Is Nothing Then
MsgBox "Cannot Find" & " " & SearchTxt.Text & ".", vbOKOnly, "Sorry"
Else
Rng1.Activate

Exit Sub
End If
End Sub

View 9 Replies View Related

Searching For Text

Oct 13, 2009

I have doc with app 1000 rows of data, one col being product description. I want to simply search the entire description column for a particular string of characters and enter a 1 in a new adjacent column where there is a match. Where there is no match, I want a 0 or a blank.

View 3 Replies View Related

Searching A Text In A Column?

May 13, 2014

I am trying to find a particular text in a column in excel. Below is the sample data.

Column A
ABA
ABA
ABC
ABC
ABZ
ABC
ABC
ABA
ABA

I would like to return TRUE/FALSE or 0/1 in Column B, B1, only if entire Column A contains atleast one ABZ. Tried search() & Find() but no luck.

View 1 Replies View Related

Searching For String Within Text

Jan 7, 2014

I am using the function Instr to search for a string within some text.

My list contains Apples and Applesauce.

How can I search for only Apples because I seem to be returning Applesuace as well.

Obviously the other way round is not a problem because searching for Applesauce will not return Apples.

View 4 Replies View Related

Searching Multiple Fields

Sep 27, 2009

I am fillin out a spread sheed with a num ber of codes. I want to create a excel formula that will look at the entire column and search for each of the codes. If I have forgotten to add one of the codes into the column I need the formula to let me know.

What I was thinking might work is this...

To look for one of the codes I would do this.
=IF(MATCH("FLA",E5:E36,0)>0,TRUE,FALSE)

This works great if the Value is in there. If it is not in there I get #N/A instead of FALSE. Is there a way to get the MATCH to return another value if it is not found in the range?

Is there an easier way to look for multiple values? So far the only solution I have found is like this

=IF(LEFT(Q19,1)="D",7.5,IF(LEFT(Q19,3)="FLB",7.5,0))

For each value I need to look up I add another IF function. I have about 17 different values I need to look for. This makes for a ugly function but it seems to work.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved