Replacing Carriage Returns With Delimiter Within A Cell
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.
Which works great for values in the reference cell that do not contain carriage returns, which is possible. The problem I am running into is that if the reference cell contains a carriage return the destination cell just ignores it and crams the lines together for display purposes. Is there a way/formula I can use to force excel to display 'exactly' as entered, in cell returns and all?
I have a situation where I have source data formatted like this:
Document ID Document Name Author
[Code]....
What I would like to do is to get each author on a separate row. I am able to do that using Text to Columns using the carriage return and then doing a transpose. I've also seen some threads where VBA is used to accomplish similar. However where I am stuck at is getting everything else to drop down accordingly. I.e. with the data set above I'd like to get to:
When I save my file as text and upload into a program, I get a response saying that my file can't be processed due to carriage returns. What are these things and how do I get rid of them? My excel file has about 6000 rows and 50 columns of data.
I have 4 cells with text in them that I am trying to combine into one cell and not have any blank lines between the text. The cells are arranged like this:
A1="One"B1=Cell where the text is combined A2="Two" A3="Three" A4="Four"
I set the cell alignment in B1 to wrap text and use the following formula in B1: =IF(A1=,,A1)&IF(A2=,,CHAR(10)&A2)&IF(A3=,,CHAR(10)&A3)&IF(A4=,,CHAR(10)&A4)
The problem is if there isnt anything in one of the cells in column A it makes a blank line between the text in column B. I am trying to get the text to the top of B1 and not have any blank lines between the lines of text. Is there a way to change the formula so that it will do the following three things:
1. If the cell A1 doesnt have anything in it then dont put the value in B1. 2. If A1 has something in it and A2 has something in it then put the text of A1 in B1 and HAVE a carriage return after the A1 text. 3. If A1 has something in it and A2 does not have anything in it then put the text of A1 in B1 but DO NOT have a carriage return after it.
I have an SQL query that returns some text data to a cell from another system. In this system the users sometimes enter superfluous carriage returns after the text.
Can someone tell me how to write a formula/VBA code that would remove the trailing carriage return/s.
I have done a search on carriage returns/characters and what has been suggested is not working. I have BOTH carriage returns in the cell and also the boxes (that I assume are also carriage returns. I tried the substitute formula (=substitute(cellref,char(10),)) in excel but it only removes the alt+enter carriage return. I tried the various suggestions of find & replace but the chr$..etc did not work! Is there a formula to clear both in one (not a macro!)..?
I'm working with a document that has several cells which require double carriage returns within cells. The location of each space is marked with an @ sign. A few weeks ago, I found an article online that explained how to do a find replace where the find value was '@' and the replace value was a series of numbers/characters that created a carriage return. When I doubled the carriage return code I got my two spaces. If I remember correctly, the string that I entered still appeared in the cell, so I needed to clean up afterwards by replacing that string with ' ', but it still left the line break.
I need a macro that runs through the cells on a sheet and removes all carriage returns. The carriage returns appear as small squares amongst the text (they come from a CSV file).
I have a worksheet containing square carriage return symbols (see below).
EXAMPLES Eg1. Baked[]Beans on []Toast Eg2. Smoked[][]Salmon in Brine Eg3. Ice[][][] Cream [][]Cosmopolitan Eg4. Mixed[]Nuts[][]per kilo[][][][] Eg5. [][]Baby Shampoo[]Fragrance Free
This data was extracted from an SQL Database and dumped into Excel.
I would like to know if someone can suggest a script to replace all occurrences of [] with a space.
Once I perform this, I can then perform a Search/Replace function as follows:
Replace 4 spaces with 1 Space Replace 3 spaces with 1 Space Replace 2 spaces with 1 Space
Hopefully then, the final result will appear as follows:
Eg1. Baked Beans on Toast Eg2. Smoked Salmon in Brine Eg3. Ice Cream Cosmopolitan Eg4. Mixed Nuts per kilo Eg5. Baby Shampoo Fragrance Free
Eg5. is a little tricky because a space will appear at the beginning of the cell (see above). It would be good if there's a script to remove occurrences of this also.
Is there a way to delete excessive carriage returns at the beginning of data. I pull reports from a SharePoint list where submitter entries often often contain multiple carriage returns before the text or data. I use ASAP utlitily to clean out excessive spaces before and after data, but I don't find a way to remove these multiple carriage returns so that the text entries are easily viewable when row-height is less than gigantic. Cells with extra carriage returns before the text entries end up looking like the following: ___________________________________________________________________ | | | | | | | | | Product page for CQ1-14047.LA is missing Swindex section (Core Drivers). | |__________________________________________________________________|
The best way to explain my problem is to look at the table below:
How it looks now: ApplePrice 1 Price 2 Price 3FruitDeliciousPearStore 1 Store 2FruitVery DeliciousHow I want it to look:ApplePrice 1FruitDeliciousApplePrice 2FruitDeliciousApplePrice 3FruitDeliciousPearStore 1FruitVery DeliciousPearStore 2FruitVery Delicious
I am looking for some assistance in creating a macro that would allow me with one key stroke to enter a cell in edit mode, add a carriage return to the end of text in the cell, then move the cursor to the next cell.
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).
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!
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.
I'm currently trying to compare all of my companies data sources for staff, ie helpdesk, telephony, ldap etc. and I have made quite a bit of progress, mostly thanks to this forum, however one issue I am running into, is the fact that when I use the text to columns funtion (in a macro) it's splitting up names which are double barrelled into 3 columns. The names are in the format of...
I do receive invoices from my vendors. They send me an invoice in PDF formate. I am using able2extract software to conver the PDF to excel. It is working great but most of the times my vendors enters the items/Case in the description field. Like the example below:
"Bajri Rotla 11 oz.(24)"
I would like to place a "," in between the last character and begining of the first number. In the above case it will be after "a" (in Rotla) and before "1" in (11). If I can do this then I can apply texttocolumn from excel and use "," as delimiter and separate item name from size and case/Pack. Then can use another "Texttocolumn" and separate size and case/pack. If there is a VBA code that can be written for this it would make my life a whole lot easier.
Following are 3 images that I have copied from actual data.
1. Original PDF invoice data that I receive from my Vendor
2. Image of the excel file before formating. This is the format from "Able2Extract" (3rd party software that I use to convert PDF to excel. Works great!!
3. Converted Excel data sheet. This is the way I want to format the data.
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.
I want to be able to replace the bolded and underlined areas of this javascript i have pasted in a cell with the value located in another cell. This means that those numbers would be replaced by a similar thing located in another cell. how can this be done? The way I would think you would do this by defining that say =b8 (an example of where the data could be coming from is ann excel formula, but not sure how to do this ...
Let's say I would like replace 27 to 163 but when I find and replay the "527" also changed to 5163. How can i filtered out 527 and just change the 27. I tried Match Entire Cell Content, it doesn't work.
I need to move data within a cell. Is there a formula that can accomplish this? Here is an example of what I'm trying to do..
Column A / TN14YP244f / TN15YP245j / TN16YP246h
What it would need to do is take the last character in each cell and move it to replace the P in that cell. It should also capitalize the letter. ie: / TN14YP244f would become / TN14YF244
The letters at the end of the cell are always different, however the letter they replace is always the same (P).
I have a long spreadsheet that is formatted and organized with six digit codes on the left, and then several lines of information on the right, in order to sort and compare to another report, I was trying to replace the blanks in the digits on the left....