ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I creat a macro to delete the first 20 cell characters (https://www.excelbanter.com/excel-worksheet-functions/139705-how-do-i-creat-macro-delete-first-20-cell-characters.html)

Bobo-ack

How do I creat a macro to delete the first 20 cell characters
 
I have a spreadsheet that has a column containing date, time and other info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing is
the same for every cell. I want to copy the contents to another column, then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks

Barb Reinhardt

How do I creat a macro to delete the first 20 cell characters
 
Select the column in question and Use Data - Text to Columns - CHoose fixed
width and NEXT. You can move the breaks or double click on them to remove
them.

HTH,
Barb Reinhardt

"Bobo-ack" wrote:th

I have a spreadsheet that has a column containing date, time and other info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing is
the same for every cell. I want to copy the contents to another column, then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks


JE McGimpsey

How do I creat a macro to delete the first 20 cell characters
 
Since the spacing is all the same, try Data/Text to Columns/Fixed...


In article ,
Bobo-ack wrote:

I have a spreadsheet that has a column containing date, time and other info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing is
the same for every cell. I want to copy the contents to another column, then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks


Pete_UK

How do I creat a macro to delete the first 20 cell characters
 
If the spacing is the same for each cell, then you can use the RIGHT
function, as follows:

=RIGHT(A1,LEN(A1)-32)

as I think you have 32 characters before the first "T".

This assumes your data starts in A1 - copy this down the column for as
many entries as you have in column A.

Hope this helps.

Pete

On Apr 20, 12:36 am, Bobo-ack
wrote:
I have a spreadsheet that has a column containing date, time and other info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing is
the same for every cell. I want to copy the contents to another column, then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks




CLR

How do I creat a macro to delete the first 20 cell characters
 
=MID(A1,34,99)

Vaya con Dios,
Chuck, CABGx3


"Bobo-ack" wrote in message
...
I have a spreadsheet that has a column containing date, time and other

info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing

is
the same for every cell. I want to copy the contents to another column,

then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks




Teethless mama

How do I creat a macro to delete the first 20 cell characters
 
Try this:

=MID(A1,FIND("^",SUBSTITUTE(A1," ","^",4))+1,99)


"Bobo-ack" wrote:

I have a spreadsheet that has a column containing date, time and other info I
don't need. (Ex: 12/13/2006 01:07 PM 3,695,666 Travis Tritt). Its a
musical listing imported from a directory. I want to delete everything
except for the final text (from the example "Travis Tritt"). The spacing is
the same for every cell. I want to copy the contents to another column, then
delete the first x number of characters so that only the text remains. I
tried to create a macro to do this but have failed. How would I set up a
macro to do this so that it is relative to each cell. Or, is there an @
function that would do this??

Thanks



All times are GMT +1. The time now is 01:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com