Split 1st & Last Names & Split Addresses After 1st Comma
Mar 6, 2008
I'm using Excel 2000 and I have a spreadsheet with 4 columns (A-D) and many (500+) rows.
Part 1:
#########################################
Colums A & B both contain identical data - a first name and a last name in the format "John Doe".
I want the second word ("Doe") removed from all cells in Column A so that only the first name remains, and I want the first word ("John") to be removed from every cell in Column B so that only the last name remains.
So, where A1 & B1 both started with the data "John Doe" now A1 contains only "John" and B1 contains only "Doe".
#########################################
Part 2:
####################################################
Column C contains addresses in the format:
"#5 - 123 Fake Street, Some City, CA 90210"
There is ALWAYS a comma and a space after the street address, then the name of the city or town followed by more data which may include one or more commas.
I would like everything BEFORE the first comma to remain in column C, and everything AFTER the first comma & space to be moved into Column D of the same row. The first comma and space are not needed again.
So, where C1 started with "#5 - 123 Fake Street, Some City, CA 90210", it now only contains "#5 - 123 Fake Street" and D1 now contains "Some City, CA 90210".
####################################################
View 6 Replies
ADVERTISEMENT
Aug 7, 2012
Is there a way to separate the suffix from various addresses i.e
A1= FOSTER AVE
A2=WISE
A3=EL DORADO ST
A4=OLD HIGHWAY 221
Some of the addresses are up to 5 words and numbers, some are missing the suffix all together.
View 6 Replies
View Related
Oct 9, 2013
In filed I have couple of value separated by comma like below:
A1 header1
B1 header2
C1 header3
Audi
592035, 579733, 653749, 579735
20 000
If my macro found that string (always will be separate by ",") should split the string and add rows (= to number of string). The output should be as below:
A1 header1
B1 header2
C1 header3
Audi
592035
20 000
[Code] .....
I have:
Code:
Set sourceWb = ActiveWorkbook
Set ws = sourceWb.Worksheets(1)
Dim LastRow As Long
Dim MY_Split As Variant
LastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
[Code] ...........
View 1 Replies
View Related
Feb 4, 2013
I have a relatively large data set that is separated into columns A-G. In column G, I have a multitude of values that are separated by commas. What I would like to do is to separate these entries into rows while keeping those values in A-F constant.
Here is an example of what I would like to do through VBA:
ex1.jpg
to
ex2.jpg
Also, kudos. This website has now gotten me interested in VBA.
View 6 Replies
View Related
Jan 18, 2012
I am supposed to create a macro which will split the comma separated values into rows.
My main constraint is, I have 3 columns of comma separated values.
Let me explain with an example,
I have 5 columns namely:
A B C D E
123 1,2,3 1,2,3 123 1,2,3,4
Once I run a macro it should show like below:
A B C D E
123 1 1 123 1
123 1 1 123 2
123 1 1 123 3
123 1 1 123 4
[Code] .......
View 6 Replies
View Related
Nov 1, 2012
I have extracted a string from my address database which goes like name,address1,address2,city,postcode,country
I need to display in Column B as:
name
address1
address2
city
postcode
country
how to do this using VBA.
View 2 Replies
View Related
Oct 26, 2013
Original table:
Column1
Column2
Column3
Column4
AAA
DDD
A1
X123, Y123, Z123
[Code] .......
View 1 Replies
View Related
Mar 30, 2013
Example: Column A has a mixture of letters and numbers. ie AU1234 or AU5678 Always the letters will be first, but not sure if 2 or 3 letters. Need to insert space between letters and numbers.
I have so far. " =(left(a2,2)) & " " & (mid(a2,3,(len(a2)-2))) " this works if all are only 2 letters...
Now. What I need to do is open a .csv (will do manually) then hit something like ctrl-alt-k to run macro.
Step 1: Insert a column next to A, check rows down and for however many rows, make above formula (include 2 or 3 letters) to insert space between letters and numbers, select the new column, copy, select column a and overwrite with the values from the new column. ie turn 'A2' from "AU1234" to "AU 1234" and 'A3' from "AU4567" to "AU 4567" .
Step 2: Column D has comma delimited fields. Column F also has comma delimited fields. both D and F will always have the same number of fields. D will be something like 1234,2345,3456 ------ in this case 3 fields but could be over 100 fields
F will be something like M0002456 (04P), M0002457 (05P), M1230477 (02A).
Need to split both D and G from row A2 simultaneously from comma fields to rows. copying all other data from row. and insert before the next set of data in what was previously A3 and (in this case *should* be moved down to A5 because of the 2 inserted lines from the 2 extra fields).
E.g.: Column A Row 2 "AU 1234" Column B Row 2 "data1" Column C Row 2 "data2" Column D Row2 "1234" Column E Row 2 "data3" Column F Row 2 "M0002456 (04P)"
Column A Row 3 "AU 1234" Column B Row 3 "data1" Column C Row 3 "data2" Column D Row 3 "2345" Column E Row 3 "data3" Column F Row 3 "M0002457 (05P)"
Column A Row 4 "AU 1234" Column B Row 4 "data1" Column C Row 4 "data2" Column D Row 4 "3456" Column E Row 4 "data3" Column F Row 4 "M1230477 (02A)"
Then carry on to next row which may have only one field and can be ignored/skipped to the next which may have 100 fields which will need to be split to rows and inserted...etc....
Step 3
Remove all the "space Bracket-data-Bracket" ie " (04P) from column F
View 7 Replies
View Related
Jul 3, 2014
I want to split the contents of a single cell(ALT Enter as delimiter) into multiple cells and retain the values in column B.
Ex:
A1: apple
banana
car
house
A2: yellow
B2: building
x
y
B3: O
Output:
sheet 2:
A1: apple B1: yellow
A2: banana B2: yellow
A3: car B3: yellow
A4: house B4: yellow
A5: building B5: O
A6: x B6: O
A7 B7: O
View 9 Replies
View Related
Dec 1, 2008
I have a string of text in one cell on Sheet 1 (ie., A1, Sheet 1), here is a excerpt:
A-dec International Inc., A. Bellotti, A. DEPPELER S.A., etc ...
What I need to do is split the cell into separate rows, using the comma as a delimiter. I will be reading the cell from another sheet and need a formula that will provide me with
A1: A-dec International Inc.
A2: A. Bellotti
A3: A. DEPPELER S.A.
View 9 Replies
View Related
Nov 23, 2007
I have file that may contain about 100 or more rows depending on the request. In column A, i have several names that is seperated by comma in ever row so basically what i want to do is to remove each name and insert a new column and paste the removed name in the new column and keep doing that until only one name is left for each row. I would like the code to check every row until the last row of the file and perform the splitting method that i have mentioned above. Pls. note that some row may contain only one name in this case we don't need to copy and insert new column but if the row contains more that one name then i would like to split it as shown below. I have attached file for details. I really appreciate for your help.
Here is an example of the current issue
Mike, David, John
Eric, Dave
Joe, Johnson, Edward, Ellen
Thompson, Adrienne.........
View 14 Replies
View Related
Sep 8, 2012
In column A of my worksheet I have a list of names (aprox 300) that are shown in the following example..
John Smith
Aron Jones
Sue Hisplof
etc etc
Is there a formula that will place each of the Surnames only in the adjacent column B...so from above list column B would display...
Smith
Jones
Hisplof
View 4 Replies
View Related
Aug 1, 2007
I have and issue where I have name in one cell and need to separate them into 2 cells. Trouble is it is a combination of single names, husband and wife, and partners with different surnames. Sample of data is below:
Belinda Smith & Grant Jones
Janine
Ken & Marie Smith
Louie & Betty Johnson
Naomi Thomsoon & Craig Brown
Narele & Barry Day
Nicholas & Julie Smithson
S M Bole & Co
Jim Morris
Danielle & JohnSimpson
View 9 Replies
View Related
Dec 16, 2007
Is it possible to copy specific names based on cell content?
For example:
If I have a cell containing text and the names Bob, Mary, Bill,
I would like have a macro read the contents of the cell, find each name "Bob", "Mary", "Bill", then write their names in the first available cells to the right.
ie: If Cell A1 contains Bob, Mary, Bill
write the names in the next available cells ( in any order)
Cell B1 = Bob
Cell C1 = Mary
Call D1 = Bill
It would be great if this can be done within a range..
If anywhere A1:A100 contains the names Bob, Mary, Bill,
to write the names Bob, Mary, Bill ,in their next available cells.
Also, I have a few dozen names that i'll be incorporating in my worksheet which I'm hoping to expand on.
View 9 Replies
View Related
May 8, 2009
How do I split numbers!
I have two problems/challenges!
Part I...
I got the answer 1987, and now I want Excel to take the numbers out and display...
1 in one box then i set + in the next, then 9 in the 3ed. box, next box +, then 8, then +, then 7 in the last so that i can have Excel make a SUM of it all to 25.
How do I split 1987 and put the numbers in different boxes?
Part II...
I want to make A=1 B=2... all the way up to 9, then start over again with J=1 K=2... up to 9 again and then over again.
So that if I write my name it comes out as a value of 14 (Odd = O=6 D=4 D=4 =14)
(AJSØ=1 BKTÅ=2 CLU=3 DMV=4 ENW=5 FOX=6 GPY=7 HQZ=8 IRÆ=9, It's the Norwegian alphabet, that's why there are some extra letters)
So how do I set up my Excel so that is ANY name is typed in I can get it out into a number from the values assign?
View 14 Replies
View Related
Apr 24, 2013
I have a list for addresses in excel in single column as shown below - aanandhi narayanan 3430 chemin de riviere sanjose,CA95148
DOMINIC ABANO 3838 GLENGROVE WAY SAN JOSE, CA 95121
abdi abdi 5390 monterey rd #6 sanjose,CA95111
Sheribel Abinsay 3212 Gateland CT San Jose, Ca 95148
I need the result to be in a way like -
3430 Chemin de riviere
San Jose
CA
95148
3838 Glengrove way
San Jose
CA
95121
5390 monterey rd#6
San Jose
CA
95111
3212 Gateland CT
San Jose
CA
95148
I have around 12000 records with the same format.
View 9 Replies
View Related
Jul 31, 2006
Here's my problem. I have a cell where there are many data strings seperated by ",". Each data string has a seperate value of its own like for e.g:
A2: aa,ab,ac
String Value
aa 1
ab 1
ac 3
What I want it accomplish is that, split the A2 cell into the different data string entities seperated by ",", then get the corresponding value of each of the data string entity, and to take the average of all the values of the different data string entities.
View 9 Replies
View Related
Aug 5, 2009
DSee the attached.
The current spreadsheets add up each persons totals by matching the name in each tab with the name of the person who won the job located in current orders tab.
BUT.....If two salesman pair up on up on a job then the formula doesn't recognise the joint name. eg Gary/paul in row 69 (current orders).
I need the totals to half the job and add it to the salesmans total accordingly. There is no 'Paul Tab' as he is our MD and doesnt have a target.
View 5 Replies
View Related
Mar 30, 2014
I have a table like this:
QTY PRODUCT
---------------------
1 AB111
3 CC332
2 DA221
Is there a way to display that information on another sheet so that each individual product is on its own line with a QTY of one? I can do it with VBA but was wondering if there is an alternative?
QTY PRODUCT
---------------------
1 AB111
1 CC332
1 CC332
1 CC332
1 DA221
1 DA221
View 8 Replies
View Related
Dec 22, 2008
I was multiplying 2 ranges in an formula to get a cell's value. The first was a set of user inputs and the second was an array of constants. Recently I needed to add another field in the middle of the user inputs which subsequently broke the range.
View 4 Replies
View Related
May 10, 2009
I have in one column first name space and then surname. I want to divide it into two columns 1 for the first name and 2 for the surname.
View 2 Replies
View Related
Feb 3, 2014
I have a very long HTML code that i am using for a description of something on our website, when i save the file in CSV format the HTML gets cut up and put into different cells on different lines ... the file needs to be saved in CSV format.
View 1 Replies
View Related
May 29, 2014
I need a routine that splits a cell with a name into its various components.
For example: split the name Johnny Jones and place Johnny into a different cell, and place Jones into yet another cell.
View 10 Replies
View Related
Dec 15, 2008
QB03654338AGLQLD210/06/2007 0:0014/02/2008 0:00
QB03654338AGLQLD215/02/2008 0:0010/04/2008 0:00
QB03654338AGLQLD219/08/2008 0:0031/12/9999 0:00
to this:
QB03654338AGLQLD210/06/2007 0:0014/02/2008 0:0015/02/2008 0:0010/04/2008 0:0019/08/2008 0:0031/12/9999 0:00
So adding it to all to one line if it is the same ID number "QB03654338". See the attached file.
View 2 Replies
View Related
Jul 1, 2009
In column A of a spread sheet I have lots of entries in this format:
admin_staff_a_002
admin_staff_a_006
admin_staff_1_010
admin_staff_1_003
admin_staff_b_005
admin_staff_z_007
admin_staff_z_001
What I need to achieve is to have a different worksheet containing all the rows for admin_staff_a then another for admin_staff_1 etc.
I want to name each of the worksheets a, 1 etc so i'd remove the admin_staff bit and the _003 bit
View 3 Replies
View Related
Jul 7, 2009
One of my three active brain cells isnt functioning today, so I need some help.
I am trying to use the "split" function but cant seem to get it working.
The variable sWbName is "MOT 4506667 C 142 #JN #SN.xls".
View 6 Replies
View Related
Nov 17, 2009
So I have strings like the one below. What I'm looking for the text behind the ":" being, 17-SEP-2009, 000737-EWO, SRS and finally 002-YAO
Example string:
date: 17-SEP-2009, number:000737-EWO, detail: SRS, DD:002-YAO
My ...
View 8 Replies
View Related
Jan 19, 2010
One of the lines in my VBA code reads as follows
View 4 Replies
View Related
Dec 27, 2011
I have a list of fixtures but each cell lists the teams in each game ... i.e.
CSKA Moscow v Real Madrid (in one cell)
List example....
CSKA Moscow v Real Madrid (Cell 1)
Leicester v Portsmouth
Leyton Orient v Charlton
Liverpool v Newcastle
Lyon v Apoel Nicosia
Man City v Liverpool
I want to split these cells so CSKA Moscow is in cell B1 and.... Real Madrid is in cell C1 etc.
View 5 Replies
View Related
Jan 2, 2013
I have long list of data (asett IDs). All of it is in the following format.
AA-BB-CC-CC001
The number of dash occurrences can vary based on the level the asett is located in. I need to extract the parrent of the asett to adjacent column. the parrent for the above example would be:
AA-BB-CC
The parrent is the values before the last "-". There can be as many as 10 "-"s and as little as 1 in the asett ID.
I have been looking at the split and trim functions in excel but I have not been able to define split/trim by last "-".
View 6 Replies
View Related