Concatenate With Delimiter
Jan 31, 2009
to concatenate across columns, say J through Q, (some of which are blank) and have the results delimited by a comma without returning anything for columns that might be blank. So R660 would read "0263B001A,FX9,FX-9,FX10,FX-10" and R669 would ...
View 9 Replies
ADVERTISEMENT
Mar 7, 2008
I receive multiple worksheets containing transaction data with multiple numbers of row and columns. The data columns contain varying types of information like: price, quantity, location1, location2, loading dock, transaction date, buy/sell, purchaser, seller, currency unit, etc.
I have a need to concatenate into a single cell in a blank column, data from a number of cells in each row -- sometimes two cells, sometimes more. In some instances, I'd like to concatenate data for location1 and location2 with a delimiter like a semicolon-and-a-space to create a cell with: "location1; location2" Or in another instance, I'd like to concatenate multiple cells in a row, like: "location1; price; quantity; transaction date", etc.
I'm looking to create a macro that, with the cursor in a blank cell in a blank row, would open an input box, ask a user to select with the cursor the cells in the row to concatenate and then concatenate them into the blank cell in the row.
Ideally, the macro would populate the entire blank column with the concatenated data for the group of selected cells (from the same columns as in the row where the cells to be concatenated were selected) for each row where there is data. It is also possible that some cells in some rows of the selected columns would contain no data. In that case, I'd be looking to return just the delimiter, like: "location1; ; quantity; transaction date"
Right now, with no macro, I do it by hand like this:
To concatenate into cell I6, the contents of cells A6, B6, G6 and H6, I do a "=CONCATENATE(A6,"; ",B6,"; ",G6,"; ",H6)" in blank cell I6, but I'm looking for a way to do it fast in a macro that would fill in all of Column I.
View 5 Replies
View Related
Aug 16, 2013
I am attempting to concatenate the dept numbers for each user in a list. For example, the first user listed below is associated with 6 depts. I would like the resulting macro to concatenate the dept's into one cell next to the Name.
Below is an example with the solution I am attempting to produce.
Sample Table
Name
Dept
Abbruzzese,James L
188100
[Code] ......
Output
Name
Dept
Abbruzzese,James L
188100, 231100, 600377, 600656, 600663, 600708
Abdi,Salahadin
600607, 600670, 600878, 600879, 710432, 710432, 710435
View 2 Replies
View Related
Oct 6, 2007
I have a list of P/N's that are used in more then one location. and it's sorted by P/N's.
ColA__ColB__ColC
______Loc___PN
______1_____A
______2_____A
______3_____B
______4_____C
______5_____C
I Want to be able to put in Col A the concatenate results of all equal P/N's from any given list. Or at least select the few cells that i know are duplicates and from that copy the Location to a single Column.
ColA ColB__ColC
______Loc__PN
1,2____1___A
_______2___A
_______3___B
4,5____4___C
_______5___C
View 5 Replies
View Related
Aug 11, 2013
Sampling table :
one
two
three
four
one
two
three
one
two
one
Desired results obtained via IF =IF(B2>0,A2&" , ",A2)&IF(C2>0,B2&" , ",B2)&IF(D2>0,C2&" , ",C2)&IF(D2>0,D2,"")
one , two , three , four
one , two , three
one , two
one
Is there any smarter, shorter formula via Concatenate and Substitute or other formulas ?
My closest match, but not good enaugh is =SUBSTITUTE(CONCATENATE(A2&", "&B2&", "&C2&", "&D2), ", , ", " ")
[ returna 2 commad ]
one, two, three, four
one, two, three,
one, two
one ,
View 9 Replies
View Related
Mar 6, 2008
I have one field that contains a city, state and zip. I need to extract only the city. I need the proper function to ask Excel to go to the cell and return all the text beginning the first place on the left, continuing until it reaches a comma. The number of places in the city will always vary.
View 9 Replies
View Related
Apr 21, 2009
I'm looking for a worksheet function that will allow me to separate into another cell the characters between the second and third slash in the source cell. The number of characters varies, but the value I want is always between the second and third slash.
View 3 Replies
View Related
Nov 11, 2008
I have a column with cells that look like: XYZ - JobABC - Area 1-A. I'd like to split the column into to and have it look like: XYZ <next column> Job ABC - Area 1-A
Normally I'd use the text to columns function and "-" as delimiter, however, there are other instances of "-" which I do not want separated. Note that the XYZ can vary in length and therefore fixed width will not work either. I have attached a small sample with the different variations that I could encounter.
View 7 Replies
View Related
Jul 17, 2007
I'm trying to check that part of a delimited field has been entered with a date format of DD-MON-YYYY and I cannot work out how to do this.
The following is what I have so far:
Public Sub date_val()
Dim rCell As Range
Dim RowCounter As Integer
Dim ColumnsChecked As Integer
Dim InvoiceDate As Date
For Each rCell In Range("B14:B5000")
RowCounter = rCell.Row
ColumnsChecked = 41
If UBound( Split(Cells(RowCounter, ColumnsChecked).value, "|")) <> 11 Then
MsgBox "Incorrect number of delimiters. Please correct", vbCritical, " Validation"
Cells(RowCounter, ColumnsChecked).Select
End
Else
End If
View 4 Replies
View Related
Jul 9, 2014
I need to organize some unorganized texts in my columns.Here is what I have in the column:
STARMERBRIEANA 134 CRICKLEWOOD AVE HENDERSON,NV 89002 CLARK Home - ( ) - Work - ( ) - Ext.
Here is what I need it to look like:
Column B = "134 CRICKLEWOOD AVE HENDERSON,NV"
Column C = "89002"
View 10 Replies
View Related
Mar 14, 2009
I have tried experimenting with LEFT, RIGHT functions. I want to edit a text string using a delimiter. For example: "NOS|NOS". I have a column of 256 rows of such entries, a name; the pipe; a name. I need to be able to strip out one side or the other using that pipe as the delimiter, leaving only "NOS". With 256 rows of items with this format - the length of the text string will vary.
View 3 Replies
View Related
Jan 29, 2013
Currently, I have an excel sheet of names and addresses. In my address column, many of the addresses have carriage returns separating information. I want to divide this information by carriage returns and parse it into different columns.
I have already tried what I believe is the correct method: I go to Data>Text to Columns. I choose "delimited." Then I enter [Alt 0101] under "other" and make sure that is the only option checked. When I finish, only *some* of my data is parsed into corresponding columns by the delimiter while some isn't.
View 2 Replies
View Related
Sep 3, 2008
I'm prepping this file to be pushed through mail merge. The sheet has 25,213 rows.
Column I contains a long string of character (for the purposes of my project the field is called Subjects) and $ used as delimiters (approx 70 or as few as 1). This column needs to be split apart by $ and the separate Subjects that result from splitting apart by $ needs to be placed on a separate line. Once each Subject is on a separate line, all of the Subjects need to be lined up in Column I, one under another (the obvious result at this point is GREATLY increasing the number of rows in the sheet). Next, all of the data that is contained in each Subject's originating row will be copied to each of newly created rows (without copying over the Subject contained in column I).
After writing this all out, I realize (once again).
View 14 Replies
View Related
Oct 6, 2009
I have a text file, which is been imported to excel sheet. There are 2 fields in the text file. Each field has to be placed in one column. The first field has values with space. Due to this the first field is split into 2 fields and totally 3 columns are imported in the excel sheet. Have set .TextFileSpaceDelimiter=True so that it would split the 2 fields, but since the first field has space in it, it splits into 3 fields. Is their any alternate way to obtain the above?
View 4 Replies
View Related
Feb 25, 2009
I need a formula, that will, Show the Characters Left of Delimiter (,).
for example:
CABLE, UD SECONDARY #4 DPLX AL
result:
CABLE
View 2 Replies
View Related
Apr 24, 2012
How do i split some text in range if it does not have a delimiter? I would like to have a comma after each letter/number or have the option to split to individual cells
I know how to use the vba split function with a delimiter but cant figure this out.
I.e susanna
S,u,s,a,n,n,a.
View 4 Replies
View Related
Aug 23, 2012
My excel sheet contains inventory of products and quantities, each is in a form of combined number followed by text without a delimeter. For example 2AWS means Two (2) of AWS.
Each cell in my excel database may contain pair of products, each is defined in the above form but the pair of products are separated with a comma.
I need to calculate the total number of each product and split in two different cells.
For example:
Cell A1: 3GFG, 2AWS
Cell A2: 2NG, 1AWS
Cell A3: 1NG, 4GFG
Desired Output
==============
GFG7 (i.e. Cell A5: GFG , Cell B5:7 etc.)
AWS3
NG3
View 3 Replies
View Related
Oct 18, 2006
I recently got this task by my work employer to transfer information from several non-organized Excel-documents into one, complete and organized one.
The thing I have to organize right now is a column with thousands of zipcodes and zones in one single cell, only separated by spaces, like this:
Zipcode Zone
115 54 Gothenburg
443 67 Skane
What I want to do is instead of having to go through 24h of braindead control/paste is to use some easy and fast function or script that could pull out the last piece of string of information in every cell in that column into its own separate cell.
Although I am using Open Office Calc/Gnumeric on Ubuntu Dapper, if a script is necessary and only work with Excel on Windows/Mac, that is no big problem for me to solve. So please, any suggestion is welcome.
I will attatch two examples for you to look at, to get the whole picture.
View 8 Replies
View Related
Feb 28, 2007
I have one column in a worksheet that I want to split into 2 columns. If there is one "(" in the cell, I want to split at that point, but if there are two "(" 's, I want to split at the second occurrence. I can use the Like operator to identify the cells, but is there a way to specify which delimiter in a sequence of identical delimiters to split at? Here are templates (not actual data) of the two type of cells:
Name1 (ABC) (Name2, Name3)
Name4 (Name5, Name6)
For the first, I want to split on the second "(", before Name2, and for the second, I want to split on the first "(", before Name5.
View 4 Replies
View Related
Jan 3, 2008
I ran across this macro in the posting " Move Adjacent Cell Into Rows, Same Column" and it is exactly what I need but when I try to use it I get a compile error on the Range("i1").Resize(n, UBound(b, 2)).Value = b. and several other problems. I also change "b" to "c" because this is where my data that I need to work with is located.
I have a similiar case much like the posting statement above where I have a spreadsheet on each row in cell "C" a EP CODE that have various information in it. My problem is that in the EP CODE column, it contains several EP CODE separated by semicolon (";") delimited . In order to serve my needs, each EP CODE instance needs to become a new row (record) whereas all of the information (except for the EP CODE) is the same and need to be repeated for each new row. Example: Before
Name Location EP code
WillisFremont 1;2;3;4;5;6
RaysSan Fran 7
SuNew York 8;9;10;11
After
namelocation EP code
WillisFremont 1
WillisFremont 2
WillisFremont 3......................
View 2 Replies
View Related
May 23, 2008
I am trying to extract the first letter of each word in a string. The string can contain either a space or a "/" as a separator. e.g. blue green or blue/green. If there is no space or "/" in the string, I need to return the 1st 2 characters.
I'm using the following formula but it is returning #VALUE!
=IF(ISBLANK(T2),"",IF( FIND(CHAR(32),T2), LOWER(LEFT(T2,1)&MID(T2,FIND(CHAR(32),T2&" ")+1,1)),IF(FIND(CHAR(47),T2),LOWER(LEFT(T2,1)&MID(T2,FIND(CHAR(47),T2&" ")+1,1)),LEFT(T2,2))))
View 7 Replies
View Related
Jun 20, 2008
I have a script to import all the data in a text file into an excel sheet. However, the data that is imported are in the first column of every row.
for e.g.
123454566788329929201012827192019128278111111111abc213123123123123
there is no comma nor / to separate the string of alphanumerics is there any vba script that i can incorporate to separate the first 3 digit in the first column then 5 digit in the second column then 7 digit in the 3rd columns and etc.
View 8 Replies
View Related
Jul 1, 2008
I've got a column of data containing addresses. What I want to do is split the column after certain keywords such as "street", "road", "close" etc and move any words that come after these in the cell into the next cell to the right.
For example, in one cell I might have "54 Burberry Road Finsbury London"... what I want to do is have part of the text remain in the original cell i.e. "54 Burberry Road" and the rest, "Finsbury London", moved to the cell on the right.
Not all cells in the column will match this format so if it doesn't find a keyword, nothing will occur and it will move to the next cell down etc. until it reaches the end of the column.
There are no delimiters (apart from the spaces) between the words.
I haven't figured out all of the keywords that I will need to search for yet but I should be able to extrapolate from something fairly generic.
View 5 Replies
View Related
Mar 18, 2013
I have the following text, in which I need separated into three columns.
Column A) Company Name
Column B) Address
Column C) Phone Number
I was thinking perhaps I could replace "-------" to just one "-" and use that delimiter to separate the phone number.
Then Use *** Company Name Here *** --> *Number Variable* and filter the rest..
But I don't see it being able to work.Here is the text I'm looking to format (Mind you there is about 8,000 Records.
And, it's all formatted like below. (Company Name, phone number being on different lines and phone number being separated by dash's
[Code].....
View 8 Replies
View Related
Feb 14, 2014
I am looking for a solution to split text from numbers.I have found a couple examples on the web but I cannot get the examples to work with the correct syntax to function.
Sample cells. The string could be any integer or floating point number with text. (The text is always after the number.)
1234txt
12.222txv
102.1hknn
Result needed
col1
1234
12.222
102.1
col2
txt
tvx
hknn
View 4 Replies
View Related
Apr 8, 2009
I have an excel column that contains the vbnew line box between two pieces of data. If I want to do text to coulmns how do I choose the vbnewline as the delimiter?
View 5 Replies
View Related
Aug 6, 2012
I have one table in word format and a sheet in excel:
word table:
Part # ID
1001 C1,C5
1002 C2~C4,C6-C7
1004 A10
excel sheet :
ID Color part #
C3 white
C1 blue 1001
C2 red
A10 black
C4 red
C5 greed 1001
C6 grey
C7 pink
I need to write a script which will take an id in excel sheet , then look up the part number in word table , copy the part number into excel sheet. So the sheet will look like this:
ID Color part #
C3 white 1002
C1 blue 1001
C2 red 1002
A10 black 1004
C4 red 1002
C5 greed 1001
C6 grey 1002
C7 pink 1002
at the end, I need to export the sheet as text file with tab as delimiter
Is this possible using VBA?
View 1 Replies
View Related
Jul 2, 2006
I need some direction on how to proceed with dismantling an address cell. I have a workbook that one field is an address label field. What I mean is the entire address is entered in one field just as it would appear on an envelope. I need some suggestions on how to break this apart and create individual fields for the individual parts.
View 6 Replies
View Related
Aug 20, 2007
I am having a problem reading from a file. I am working with some old code. I am reading information in from a txt file. The information on the txt file is separated by commas on each line. My question is, how can I read in for example, the third section on the first line. By section I mean...
line 1:
section1, section2, section3, section4, section5
I want to read section3 into a string variable. If anyone can help me please post. I am having the hardest time finding this online.
View 9 Replies
View Related
Jan 12, 2012
I frequently review DAT files. These DAT files use a variety of characters as delimiters. I'm trying to devise a macro that will perform a text-to-column operation, using the content of a specified cell as the delimiter.
Here's my code, which uses - (ASCII 0254) as a delimiter:
Code:
With Sheet1
Range("A1", ActiveCell.End(xlDown)).Select
Do
[Code]....
Instead of having the delimiter hard-coded, I'd like my macro to use whatever character I enter into Sheet3.Range("i5") as a delimiter. That way, I can easily change my delimiter character as necessary.
View 4 Replies
View Related