Excel Help

Status
Not open for further replies.

mike82

New member
Mar 3, 2007
121
0
0
In Excel, I have hundreds of URLs in the following format:

http://www.test.com/file.htm, 1, 03/08/2006 at 11:04 AM

I want to remove everything to the right of the comma (including the comma, so that only the URL is there)

How can I do this in Excel? Thanks.
 


use a find() or search() tog et position and a left() to remove crap.
 
you opened a CSV file evidentally.

What you want to do is open a fresh workbook in excel, then choose DATA > EXTERNAL DATA > TEXT FILE

or in 2007 DATA > IMPORT TEXT FILE

And use the wizard. It'll break the commas out.

If you already have the values in an excel column and other legitimate columns, the above will still work, but you can copy/paste the File,num,date,time column into notepad and do what I wrote above, then copy/paste back into xls.

Clear as mud? Sorry. end of day and I'm trying to get out.

moral of the story, don't open the CSV, open excel, the import the CSV.
 
Data > Text to Columns > Delimit by commas

This will split them into columns and you can just delete the columns
 
I'm in a good mood... assuming that string is in a1...

=left(a1,find(",",a1)-1)
 
Data > Text to Columns > Delimit by commas

This will split them into columns and you can just delete the columns

This is proper way to do this.

I am assuming this might not actually be a CSV, and even if it is, when you open as an XLS it might convert improperly.
 
Status
Not open for further replies.