LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
guy guy is offline
external usenet poster
 
Posts: 12
Default change values in a column

The values in column J are displayed as 1, 2, 3, 4, ...., 9, 10, 11, ....
I need all the values that are less than 10 added with leading 0, which are
put into column L.
(actually i want the values in column J change themselves, but i want to see
the difference before and after change, so i put the new values in column L)
But the following codes failed to do so....
Pls help...
Thanks a lot!!

----------------------------------------------------------------------

Sub test()

Dim i As Long
Dim st As String

For i = 2 To 150

Cells(i, 13) = TypeName(Cells(i, 10).Value)

If Cells(i, 10) < 10 Then
Cells(i, 11) = "yes"
st = "0" & Trim(Str(Cells(i, 10).Value))
Cells(i, 12).Value = st

End If

Next

End Sub



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change values in a column dmack Excel Discussion (Misc queries) 3 April 21st 08 11:26 PM
How can I change all negative values in a column to = 0? dbsavoy Excel Worksheet Functions 3 August 21st 06 08:14 PM
How to find the largest change of values in a column Ravager Excel Worksheet Functions 5 August 11th 06 07:00 PM
Change all values in an excel column at once? Sn0wman Excel Discussion (Misc queries) 4 April 25th 05 01:08 PM
Better way to apply change to column of values Tod Excel Programming 3 September 16th 04 07:14 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"