LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Concatenating a zero


Hi,

Writiing a macro which goes through each cell 9they are numbers) i
column 5, if the length of the cell is 1 a zero is added to the start

Below is an excerpt of the code, not quite working, many thks

Dim i
lastrow = Range("A50000").End(xlUp).Row
For i = 1 To lastrow
If Len(Cells(i, 5)) = 1 Then
Cells(i, 5) = "0" & Cells(i, 5)
End If
Nex

--
T De Villier
-----------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...fo&userid=2647
View this thread: http://www.excelforum.com/showthread.php?threadid=56371

 
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
concatenating TED Excel Worksheet Functions 3 February 13th 09 01:03 AM
concatenating Yosh Excel Discussion (Misc queries) 7 February 7th 07 09:03 PM
Concatenating % confused Excel Discussion (Misc queries) 2 September 21st 06 03:49 AM
Concatenating Himu Excel Programming 7 July 23rd 05 08:58 PM
Concatenating Metalteck New Users to Excel 10 May 4th 05 01:01 AM


All times are GMT +1. The time now is 06:48 AM.

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"