ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   can i write a macro to truncate alpha-numeric data? (https://www.excelbanter.com/excel-discussion-misc-queries/104627-can-i-write-macro-truncate-alpha-numeric-data.html)

T-Dot August 12th 06 06:46 AM

can i write a macro to truncate alpha-numeric data?
 
I have imported a bunch of data into excel, however, the data I have has a
bunch of extra characters at the end that I don't need. Can I write a Macro
to delete a set number of characters off of each cell that I run the macro on?

raypayette August 12th 06 07:59 AM

can i write a macro to truncate alpha-numeric data?
 

This is the key code:
a = Replace(ActiveCell.Value, "s", "")
the rest is up to you!


--
raypayette


------------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
View this thread: http://www.excelforum.com/showthread...hreadid=570980


paul August 12th 06 08:15 AM

can i write a macro to truncate alpha-numeric data?
 
you dont necessarily need a macro .Post a sample of what the dates look like
now what you want them to look like
--
paul

remove nospam for email addy!



"T-Dot" wrote:

I have imported a bunch of data into excel, however, the data I have has a
bunch of extra characters at the end that I don't need. Can I write a Macro
to delete a set number of characters off of each cell that I run the macro on?



All times are GMT +1. The time now is 01:04 AM.

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