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


ADVERTISEMENT

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 View Related

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 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

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

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 Afolder With Different Account Names On C: Drive

Jul 13, 2006

I have a loads of folders with different account names on my c: drive. What I want to do is put in part of the name rather than al ofl i.e. Manchester United, would just put in Manchester I have seen the * used but was not sure how this works

View 2 Replies View Related

Replace End Of A String Only In Strings Containing Names

Apr 23, 2014

I have a VBA find and replace question

I have a spreadsheet with cognitive tests (approx 300) that have been given names like

w3_th_e
w4_th_e
dkefs_TMT1_e
pegboard_eh_e

What I need is a VBA macro that replaces the _e only at the end of the string to _ss for those strings that begins with w3_, w4_ and DKEFS_ (e.g. from w3_th_e to w3_th_ss)

Likewise I want to replace only the _e at the end of the string on all other names (e.g. pegboard_eh_e) with _t (e.g. from pegboard_eh_e to pegboard_eh_t) Is this possible?

View 4 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

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

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

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

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 Text In Cells For Words

Mar 17, 2008

I have a column that is filled with text of varying lengths and I'd like to search through each cell in that column looking for a specific word or words. Unfortunately the length of the text varys greatly between each cell and there is very little uniformity so I need to be able to search through the entire entry in each cell and then highlight that row if a specific word or words are found.

I'd also like to be able to add a number "1" in another column on the same row if the search finds a word or words. Any help would be greatly appreciated.

If the cell only contains the exact word or string I'm looking for then it's easy but I can't figure out how to search through text in a cell that contains more than I'm looking for.

example: Lets say I'm loooking for "caught fire"
column Q contains:
1 "The computer caught fire after several hours"
2 "A house on the hill caught fire"

If "caught fire" exists in the cell being checked, then highlight the row and put a 1 in a specific column, lets say J.

View 14 Replies View Related

Searching For A Number Within A Text String

Jun 2, 2009

I have a list of customers and account numbers contained within a cell. I need a formula if possible that searches from the right of the cell and then returns the all the numbers. e.g.

Arsenal1234Required formula result 1234
Liverpool2456Required formula result2456
Chelsea100564Required formula result100564

I can not use text to columns as they data is not consistant. Also worth noting is that the customer numbers vary fro 1 digit to 9 digits long.

View 5 Replies View Related

Searching For String In Cell Text?

Aug 2, 2012

I have a cell that is populated by clicking a button which pulls info from an external source over which I have no control. I need to confirm the selection made by the user contains one of four quarterly values: Mar, Jun, Sep or Dec. I have this but wanted to know if there is a better alternative or a way to shorten the code.

Code:
If InStr(1, UCase(celltxt), "MAR") Or InStr(1, UCase(celltxt), "JUN") _
Or InStr(1, UCase(celltxt), "SEP") Or InStr(1, UCase(celltxt), "DEC") Then

View 6 Replies View Related

Text Searching Data Matching

Aug 20, 2012

I have very large spread sheet with alot of data. My goal in this is to create a seperate simplier spread sheet with some basic information to work with day to day chasing.

My spread sheet will consist of 1 work book but to pages page 1 the main with all the info page 2 the simplified version.

The first column in the first page consists of company names. The first column in the second page is also company names. What I want to do on the second page is take certain pieces of data from page 1 on page 2 as well.

So for example page 2 column 1 will have company name and column 2 will have certificate number. On page 1 the certificate number is column 16

What I would like is for page2 to column 2 to do is search for page 2 column 1 text in page 1 and input the value of page 1 column 16.

View 1 Replies View Related

Searching For A String In A Text File

Sep 12, 2006

I wrote some code which has compiled a LOT of text files telling me what computers have licence for certain software.

The name of the txt file is the computer name and data within is simple:
--------------------
Audit of GQL license
Audit of Visio license
Audit of Frontpage license
Audit of Project license
Audit of Visual .NET license
Audit of Word (Office) licenses
Found Office
--------------------
as we can see here this computer has 1 licence for OFFICE.
If the string "FOUND" is found then i want to be able to paste the licence name in a spreadsheet and in the next cell underneath paste the filename it was found in the e.g.

VISIO
comp1,comp2,comp3,comp4

WORD
Comp2, comp3, comp4, comp5....and so on......

View 9 Replies View Related

VBA Sum Different Strings Of Text

Dec 3, 2012

Different formula in different cells give me some text as output, to format this. I would like to copy and paste in one cell, so that I can easily then register a macro on top to wrap the text in one big cell.

View 1 Replies View Related

Searching For Text Within Worksheet And Selecting The Cell

Feb 17, 2014

I'm using a command button (p1) within Private Sub P1_Click()

It pulls the activecell as a string (for example $A$1) using a variable called CurrCell, I then want to search this string (currCell) within the worksheet "DATA" and select the cell 3 to the right of it, so that I can change the value.

View 1 Replies View Related

Conditional Formatting By Searching For Text Within Range

Feb 9, 2007

I have two named ranges of cells, validcodes and actions. I want to conditionally format any cell in the actions range, if I enter something that contains certain validcode range values.

Example: ...

View 9 Replies View Related

Finding Cells Containing Specific Text By Searching

Nov 17, 2008

The easiest way of explaining what I'm after is to say, I have letters of the alphabet, in their own cells, and I want to find them by way of a search. I don't mind how this is done, but it would be good if for example you entered A, C and E, any cells containing those letters changed, maybe became bold, or the cell filled with colour.

View 9 Replies View Related

Manipulating Text Strings

Jan 12, 2010

I have a column filled with names per row. I wanted to standardize it by using the following format.

The comma after the last name is always an indicator to me that it is the last name.

<First Name> <Middle Initial(if any)> <Last Name>

My actual records contains the following:

BIMBO EPPING - OK
AHMAD SADICK - OK
Salana, Laura R - need to be arranged to > Laura R Salana
Cantos, Rhoda Grace J - need to be arranged to > Rhoda Grace J Cantos

View 13 Replies View Related

Check For Different Text Strings

Jan 9, 2012

Can the below be achieved with any formulae or macro -

I have 2 worksheets (sheet1 & sheet2). In sheet2, i have some colors in column A (e.g. "red" in A1, "blue" in A2, "green" in A3.

In sheet1, i have some text strings in column A, e.g.

A1: I love red color
A2: my pen in blue
A3: Green grass
A4: Orange juice
A5: I like red and blue

What i want in corresponding cells in column B, is the name of the color which is in column A. so my output should be

B1: red
B2: blue
B3: green
B4: "NIL" (any error message)
B5: red (even though it contains 2 color, i am happy to show any one of the colors it contains)

View 2 Replies View Related

References And Text Strings

Dec 9, 2012

n cell D3, enter a reference to the value in B7. Format the cell to display the text string Interest Rate.

In D3 i entered =B7 and the value for B7 popped up in cell D3, I am confused on how to enter the text string.

View 4 Replies View Related







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