Removing Unneeded Characters from Cells

carrieebacon

New Member
Joined
Jan 15, 2024
Messages
47
Office Version
  1. 365
Platform
  1. Windows
For some reason when I import csv files that have been exported from Civil 3D they contain characters that are not needed. For example, the letter P is in front of the text in each cell or by itself in a cell. In column D, each cell contains a structure ID such as CI #145. Instead, it says C4;CI #145}. Is there any way for me to do a mass clean up to get rid of what I don't need?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Simplest way would be to select the entire sheet and use Ctrl+H to find and replace each unwanted character with no space "". Though you would have to make sure there aren't any valid combinations of unwanted characters that you want to keep.

How many different unwanted characters are there? More than the sample you have provided?
 
Upvote 0
Simplest way would be to select the entire sheet and use Ctrl+H to find and replace each unwanted character with no space "". Though you would have to make sure there aren't any valid combinations of unwanted characters that you want to keep.

How many different unwanted characters are there? More than the sample you have provided?
I believe only 6 unwanted characters.
 
Upvote 0
If for a particular column, the unwanted characters are always in the same place (i.e. the letter "P" is in the first spot in every cell in a particular column), you may be able to use Text to Columns in some cases to easily split off and discard the first character. Just highlight the column, go to Text to Columns (on the Data menu), selected "Fixed width", put the delimiter after the first character and then set the first field to "Do not import column (skip)", and it will lop that leading character off every cell in the column all at once.
 
Upvote 0
This is what I am working with after using Text to Columns. When I import the csv, everything is together in 1 column, separated by backslashes.

Capture.PNG
 
Upvote 0
What does the original CSV file look like, when viewed in a Text editor (like NotePad), before bringing it into Excel?
Can you post an image of that?
 
Upvote 0
OK, that does not appear to actually be a CSV at all. CSV stands for "Comma Separated Value", meaning commas are used to separate the different data fields.
Some places will use semi-colon instead of commas as separators.
But I do not see that at all. It does not look like you are using commas or semi-colons as field separators.

Based on this sample data you have posted, can you show us exactly what you want to get out of it?
What do you want the end product to look like?
You can show us an example based on your data above.
 
Upvote 0
This is the file in my folder (selected)
capture 1.PNG

This is what I would like the end product to look like:
Capture.PNG
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,970
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top