Extract Alpha From A String And Compare With Another String

Aug 23, 2007

I have a problems here. The problems is attached in the file. I wanna extract alpha/char from a string. Example: I wanna extract the words "(M)" with the bracket from the string "Toothbrush (M)" in column A. After extracting the (M) out, I wanna do a validation to compare the (M) in column B with another data in column C, if the (M) is same as the data called "Medium" in column c, the validation will return "Match" in the column d!

View 9 Replies


ADVERTISEMENT

Compare Adjacent Cells, And Split Alpha Numeric String

Jan 7, 2009

I have another problem with this damn address file. Column H and I have data in them that is often mixed. As shown below, I have used A and B below, but its normaly in Column H and I. I would be greatul if some could write a macro to split the data into the two columns.

Rows 2-8 is what Im presented with. I would like them to look like 11-17

Note that the number in row 8 does not match, so is left for manual intervention....

View 9 Replies View Related

String Extract - Separate First Two Or Three Letters In A String

Sep 4, 2012

I am working with flight numbers and want to split out the letters from the digits. Examples,

BA1234A
BA123
EZY4566H
BE7893B

In column A I need the first two or three letters only,

BA
BA
EZY
BE

In column B I need everything to the right of what appears in column A

1234A
123
4566H
893B
etc.

View 7 Replies View Related

Extract String Between Characters After Specific String

Dec 22, 2013

I have the following type of info in A1,A2,A3...

Code:
nameGaryage40cityPittsburgheight190
age30height150
ameLindacityMichigan
citySan Jose
ameHarryheight180age50

My goal is to get as close as possible to this,so it will be easier to sort and manage

Code:
nameGaryage40cityPittsburgheight190
nameLindaage30cityMichiganheight150
nameHarryage50citySan Joseheight180

I can't use the "" sign as delimiter to separate them into different columns because the age,city,name and height fields are in random positions on different cells.The good thing is person's name will always come after "name" string, age is alwals followed by "age" string, so it cannot be like nameheight40Michigan180

I think the following would be the easiest method(not for me tho).If on B1 I had a formula that said "find the string "name" and write anything after it until you reach the next "" character".On C1 field I could have a formula "find the string "age" and write anything after it until you reach the next "" character.On D1 I would have the same for "height" string,then on E1 for city string.

My question is somewhat similar to this one
Extract A String Between Two Characters

Formula which outputs the data between 3rd and 4th instances of the "_" character.Can we substitute "3rd and 4th" with a specific strings like "age" or "height" ?

Code:
=TRIM(LEFT(SUBSTITUTE(MID(A1,FIND("|",SUBSTITUTE(A1,"_","|",3))+1,LEN(A1)),"_",REPT(" ",LEN(A1))),LEN(A1)))

View 3 Replies View Related

How To Increment Alpha Number String

Sep 19, 2012

I have a log that I need to number starting in cell A1, as follows:

A-0001
A-0002
A-0003

etc.

I've put this formula in A2 to try an increment it by 1, but it just replicates the string in A1:

=LEFT(A1,3)&MID(A1,2,5)+1&RIGHT(A1,2)

with the proper syntax?...

View 5 Replies View Related

Keep Each String / Segment Intact Regardless Of Alpha / Numeric

Sep 27, 2011

Problem: String is broken into 2 parts within a delimeter.
Goal: To keep each String/Segment intact regardless of Alpha/Numeric.

I have a .csv file with 26 segments (commas). This file contains customer data: PO#, Order#, Carton ID, Address 1, Address 2, Address 3, etc.

I've written code to capture all 26 segments as: Input #1, Seg1, Seg2, ... ,Seg26. The variables work fine until it encounter a string with Numeric first then Alpha within the same segment.

For this example we have a string such as (...,187 Main Street, PO Box 369,...)
Seg4 = Address
Seg5 = PO Box

The Segment Variables in Input #1, get shifted when it encounters the numeric portion of the address...so the result becomes:
Segment4 = 187
Segment5 = Main Street
Segment 6 = PO Box 369.

So on my next loop when ReadLine is executed...all the variables are shifted and I can't focus on the specific segment that I need to do something to it.

It delimits when it encounters Numeric then Alpha within the string, but accepts the entire string into the variable when its Alpha then Numeric within a delimeter.

How I can keep the entire string in tact within each delimeter?

View 8 Replies View Related

Alpha String Formula - Remove Duplicates When Starting In Cell Going Downward

Aug 22, 2013

I have a string of letters in cell column L20 through L3019.

The letters are A, B, C, and R . No other letters.

I wanted to find out if it is possible to remove any duplicates when starting in cell L20 going downward.

For example:

L20 = B
L21 = A
L22 = A
L23 = B
L24 = C
L25 = C
L26 = C
L27 = C
L28 = B
L29 = R
L30 = A
L31 = C
L32 = C
L33 = C
L34 = R
L35 = R
L36 = B
L37 = B

In the range L20 through L37 all the letters have appeared so my goal is to create a formula where the outcome is BACR. Starting with the first letter B in cell L20

Cell range L20 through L37. Looking for the next letter which would be either A,C, or R. Since we already used the letter B. In this case it's the letter A
ABCR

Cell range L20 through L37. Looking for the next letter which is the C or R. In this case it's the letter C
CBRA

Finally range L20 through L37. Looking for the letter R which is in cell L29.
RACB

View 9 Replies View Related

"Masking" Out Non Alpha Characters From A String

Jul 20, 2009

I am comparing to columns of data from MS Project using Excel. In one column are the resource names for the project tasks. In addition to the names are the designations for % utilized. So the column's data will look like this:

John Jones[15%],Mary Smith, Fred Arguello[240%].

I want to compare this column with another resource names column which will never have utilization values - only the names.

In order to do that I need to "mask" the non alpha characters out of the first string.

View 9 Replies View Related

VBA - Extract Value From A String

May 16, 2013

I have a string that follows this format: SAMSUNG CT797F-1

From this string I need to extract 797F only. Further complicating the problem is that its not always SAMSUNG it could be ABB CT797F-1 or KOMSATISU CT797F-1

I have implemented a function that can extract all the numbers, but can't think of how to extract 797F from the various different strings.

View 6 Replies View Related

Extract Last Name From A Name String

Nov 28, 2006

I have a list of names in a data set like the examle below. I would like to be able to isolate the last name so I can match the data in this data set with a data set with additional information. The only common set of data I have is the first and last names.

View 9 Replies View Related

Use Mid To Extract String

Apr 10, 2007

I need to extract the term between the two colons: Snowboard Jackets

This term resides in AB289-
Snow : Snowboard Jackets : Guys SoftShell

Using MID, but not able to get all the term

View 9 Replies View Related

How To Compare Two String In Two Different Workbooks

Aug 4, 2014

I want to compare a string in a different workbook. and find the relevant cell value of that.

e.x. in one worksheet the value displayed like "DEBIT/ATM CARD TRANSACTION FEE" But in another worksheet the value displayed as "018 - Debit/Atm Card Transaction Fee".

Now I want to compare this string and the value displayed in the column E for this row of workbook 2 should be displayed in workbook 1 in the column D.

View 6 Replies View Related

Compare Range To String?

Jan 24, 2014

I am working on a project where I need to remove records based on certain criteria.

The key pieces of information here are the Company ID, the Contact ID, and the Product Codes. Each Company ID can have multiple Contact IDs, and each Contact ID and have multiple Product Codes. (To be more clear, imagine one company with a Tax department and an Audit department - with each department having a separate contact person. And, each contact person purchasing multiple products.)

I have already summarized the data by identifying the unique Contact IDs and combining the corresponding Product Codes into a string.

Now, I need to determine if any Product Code within the summarized string matches a Product Code in a separate list (a Range of cells). If so, each instance of the Company ID needs to be moved into a different tab. Also, to understand the magnitude of my records, I am working with 25,000+ unique records in the first tab, 8,000+ summarized records in the second tab, and 50+ product codes in the separate range in the third tab.

My first thought was to use a For loop to determine if any cell in the Range is found in each string and, if so, add the related Company ID to a dictionary object. Then, run another For loop against the Company IDs in the summarized tab (8,000+ records) to determine if the ID exists in the dictionary and, if so, moving the row to another tab.

My second thought was using the original data (unique records) - I would load all the Product Codes in the separate Range into one dictionary and run that dictionary against the individual Product Codes in the unique records tab (25,000+ records). If the Product Code in the unique records is found in the dictionary, I would add the related Company ID to another dictionary. Then, I would run a For loop comparing the second dictionary to the Contacts IDs in the summarized tab and move the ones that exist.

In summary, the two ways I have come up with to accomplish what I need includes:

1) a For loop, a dictionary, and another For loop

2) two dictionaries and a For loop

View 6 Replies View Related

How To Compare Two String Variables

Mar 27, 2014

I am trying to to work out how to compare two string variables that I can see with my eyes are clearly a match but getting the right syntax to convince VBA they are the same is my issue.The first example is:

Direct Credit 158824 BRANDON DONNA C/ Lak30

the second example is:

Direct Credit 158824 BRANDON DONNA C/ 30 Lake Vue Parade

but that still would not get a match that I can find code for.

i am chasing the "holy grail" in VBA and I will leave the records that do not exactly match to manual processing although i hate to give up that easily

View 2 Replies View Related

Compare Two String In Two Cells

Apr 18, 2013

Some data

In Cell A1 This is a bag
In Cell B1 This is a bag with books

now in Cell C1 i need the mismatch words With books
C1 should show with books

I am now manually finding the words of cell A1 in Cell B1 and then writing the mismatched words C1 .

View 3 Replies View Related

Extract Month And Day From String?

Feb 9, 2014

I need to extract the month and day from a date / time string into another cell. An example of the string is 1/28/2014 10:26

I want the result to be 1/28

View 4 Replies View Related

Extract String From Cell

Aug 20, 2009

In the following rows I want to extract the string that ends in K (ie everything after the final space). But I don't know the starting position or how long the string will be.

C2 9K
C1M (RB57) 4K
C2 4K
C6 FM (RB78) 120K
C2 9K
C1M (RB57) 3.5K
C2 (RB68) 12K

Can this be done?

View 8 Replies View Related

Extract Data From A String

Sep 7, 2009

I have a string (as below - Call them A1:A4) which I would like to seperate into 4 columns (Call them B1:E4).

I have successfully seperated the first part using MID (It's always 5 digits) but the second part has a varing length which then impacts on the third and fourth parts of the string.... Any ideas?

87261 WIMBLEDON 10:08 10:10
87169 NEWMALDEN PASS 10:13
87171 SURBITON PASS 10:15
87177 HMPTNCTJN PASS 10:16

To add to this I am using the POCKET PC version of Excel which does not have all functions so at the moment I am limited to which functions I can use (Can you add functions to the PPC?).

View 6 Replies View Related

Extract Text From String

Dec 10, 2007

I need to be able extract a string from within a longer string. The information I want will always start 5 chracters in and be bordered by an underscore either side, but could be of any length. For example in the following string, I would want to extract WF602.

DDR_WF602_____02_00_001_FLANGE_WR34_4_HOLE_PLAIN_CLEARANCE

I've been looking at the RegExp functions but can envisage problems with this as later parts of the string (WR34) have the same form as the part I need.

I can get rid of the first 4 characters using

View 9 Replies View Related

Extract From String Using Wildcard ..

May 14, 2009

I've this question, how do i extract a part of the text using wildcard(example "ID=") in the string in the whole columns and copy to other columns or delete the unwanted.

Below is a example which i create for better understanding.

View 11 Replies View Related

Extract Date Only From String

Jul 2, 2010

What I want to do is extract the date only from a string of text in a cell and put it in the cell next to it. The date is not alway in the same position within the text string and although similiar, the text string can differ. There are around 6000 lines in the sheet, I've pasted 4 as an example below.

THE BIG COMPANY LTD 15312178 COLLECTION 14.12.09
The Small Company Ltd 19073864 COLLECTION
DATE 17/05/10 511438 511437 511436 ORD LE
The Medium Size Company 19080948 COLLECTING WEDS 26/05/10
The Very Good Company 19149554 COLL DATE:28.06.2010 175 PEA PARK ROAD Z7 9AB

View 9 Replies View Related

Extract Numbers From String?

Feb 1, 2012

I need a formula to extract the numbers from data in a cell:

Examples of data in cells:

G 622 ENTERTAINMENT ( I need to extract 622 )
D 6129 TOYS ( I need to extract 6129)
C 1039 Toddler TOYS ( I need to extract 1039 )
R 05 VEHICLES (I need to extract 5 )

All the cells have spaces before an alphabetical identifier, then a space ( it could be more than one in some cases ), then a number ( between 1 and 4 digits ), then a space and a description.

View 9 Replies View Related

Extract Data From A String?

Apr 23, 2012

I am trying to extract the ounces (OZ) data from a string: example, BOX 15OZ 1819106287, CONTAINER 12.3OZ 1818176234. I need everything from OZ prior until there is a space.

I.e.
15OZ
12.3OZ

View 3 Replies View Related

Extract Particular Data From A String

Jun 29, 2012

I have a file which contains one field showing all of the changes to our data. It shows the Field Name followed by a colon: then the Before value followed by a line | then the After value. If multiple fields changed then they are separated by a semicolon;.

I am interest in extracting the Before and After values for changes to the MP.COST field only. Here are examples of the data:

A1 = "MP.COST :4.00|3.50;MP.FLAG :Y|N;"
A2 = "MP.COST :4.25|4.12500;"
A3 = "MP.CODE :125064|200009;MP.COST :4.79|4.66000;"

For A1 I want to pull back 4.00 and 3.50
For A2 I want to pull back 4.25 and 4.12500
For A3 I want to pull back 4.79 and 4.66000

These are all of the Before and After values associated to MP.COST.

Kow I can accomplish this either through an excel formula or piece of code?

View 3 Replies View Related

Extract 2nd Number From A String

Feb 15, 2013

I wanted to return the second number in a string such as this:"0 of 0 jobs ... View all jobs"

The following worked perfectly:=MID(U3,FIND("f", U3)+1,LEN(U3)-FIND("f", U3)-23)

Until this line came up:"1 of 1 job ... View all jobs"

Obviously the "jobs" changed to "job" because of there being only 1, so the "-23" no longer worked. I need this to get the second number out of the string and it can change because the data is being refreshed from a website so it could easily change from one line to another.

View 3 Replies View Related

Extract Address From String?

Mar 28, 2013

I have the following string of text and need to find a way to extract the address and city (separated)

Paste!A2 = 000-0000-0000 12-Mar-13 0.00 12-Mar-13 100.00- J Doe 1111 Excel Rd Vancouver BC 000.00 W
Paste!A3 = 000-0000-0000 12-Mar-13 0.00 12-Mar-13 100.00- J Doe 111-2222 Random Ave Calgary AB 000.00 W

The spaces separating the name address and City do change so i have not been successful using a simple Mid/right/left Find formula. Also the street addresses can include a unit # as shown in the text string above. I am honestly at a loss

End results would of course be:

G2 = 1111 Excel Rd
G3 = 111-2222 Random Ave
H2 = Vancouver BC
H3 = Calgary AB

View 1 Replies View Related

How To Extract Date From String

Jul 17, 2013

I want to extract date from string My dates are going to increase every 9 days. as you can see in table given bellow. And goes till Wk52

Wk1-> 02-Jan-11
02-Jan-11
Wk2-> 09-Jan-11
09-Jan-11
Wk3-> 16-Jan-11
16-Jan-11
Wk4-> 23-Jan-11
23-Jan-11
Wk5-> 30-Jan-11
30-Jan-11

View 2 Replies View Related

Extract Text From A String

Sep 13, 2013

I have thousands of address fields that look like this:

100 Broadway, Suite 1101 New York, NY?10005 United States

Sector 30, NH-8 Gurgaon, Haryana, ?122002

61 Broadway 17th floor New York, NY?10006 United States

11 Beacon Street, 3rd Floor Suite 305 Boston, MA?02108 United States

88 7th Avenue New York, NY?10109 United States

600 Pennsylvania Ave SE Suite 220 Washington, DC?20003 United States

1601 Elm Street Suite 3900 Dallas, TX?75201 United States

50 Federal Street Suite 600 Boston, MA?02110 United States

I need to separate the street address, city, state, zip and country.

View 4 Replies View Related

Extract Numeric Value From A String

Nov 26, 2013

I have the following data.

Column A is for ID and column B is for Notes.

I need find a formula that will extract the number that is highlighted in red and place it in column C. Would this be possible?

ID
INTERNAL NOTES

355104

[Code] .......

View 9 Replies View Related

Extract The Last Number From A String?

Jun 20, 2014

It's for listing items to eBay. Ink Toners to be precise, the macro I have creates everything I need for a listing with a few msg prompts and importing data from another sheet. Saves me hours of work. Each cartridge has a Black, Cyan, Magenta, Yellow. The macro works fine for cartridge sets that go under one name. E.g: Brother TN325 Black, TN325 Cyan, TN325 Yellow... etc.

I've run into an issue with some cartridges which have different names: HP C530a Black, C531a Cyan, C532a Yellow...

I set the macro up to deal with different number, by removing the last character of the "tonername" string "C530", then replacing it with "C531".. etc.

What I haven't factored in is the ones with an A on the end. I need a way to tell it to ignore the a if there is one.

To make it clear, I will be inputting the text: C530a From this, I need to create 3 more strings: C531a, c532a and C533a

Here's the snippet of code I'm using to achieve what I'm already doing.

Code:
Selection.Replace What:=A, Replacement:=Left(y, Len(y) - 1) & "1"
Selection.Replace What:=b, Replacement:=Left(y, Len(y) - 1) & "2"
Selection.Replace What:=c, Replacement:=Left(y, Len(y) - 1) & "3"

[Code]....

View 1 Replies View Related







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