Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
How do I change data in a column via VBA. Here's what I am referring to: In column A I have data that looks like this 0001 0002 0003 I need to take off the leading 0 so it looks like this: 001 002 003 Any help would be appreciated ! Developer |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one way.
Sub takezero() Dim cell As Range For Each cell In Range("A1:A100") cell.Value = Right(cell.Value, Len(cell.Value) - 1) Next cell End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each cell in selection
cell.Value = "'" & Right(cell.Text,3) Next This assumes the zeros are not produced using a custom format. If that is the case, just change the custom format. -- Regards, Tom Ogilvy "Gsurfdude" wrote in message ... Hello, How do I change data in a column via VBA. Here's what I am referring to: In column A I have data that looks like this 0001 0002 0003 I need to take off the leading 0 so it looks like this: 001 002 003 Any help would be appreciated ! Developer |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom:
Thanks. This worked fine and what was needed.. Thanx again "Tom Ogilvy" wrote: for each cell in selection cell.Value = "'" & Right(cell.Text,3) Next This assumes the zeros are not produced using a custom format. If that is the case, just change the custom format. -- Regards, Tom Ogilvy "Gsurfdude" wrote in message ... Hello, How do I change data in a column via VBA. Here's what I am referring to: In column A I have data that looks like this 0001 0002 0003 I need to take off the leading 0 so it looks like this: 001 002 003 Any help would be appreciated ! Developer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help With Manipulating Data | Excel Discussion (Misc queries) | |||
Help with manipulating data in excel? | Excel Discussion (Misc queries) | |||
Manipulating a matrix of data | Excel Discussion (Misc queries) | |||
manipulating scanned data | Excel Discussion (Misc queries) | |||
Manipulating Data Problem | Excel Worksheet Functions |