LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Number formate of Integer

The statement you have is just a counter. It counts from the value of C2 to
the value of C3. It has nothing to do with the format of the cells. Try
adding these lines afterwards to see what I mean

msgbox i
msgbox format(i, "#,##0.00")
msgbox format(1, "0000")
--
HTH...

Jim Thomlinson


"Alf" wrote:


Part of my macro looks like this:

Dim i As Integer

For i = Range("C2"). Value To Range("C3").Value Step 1

I've formated cells "C2" and "C3" so if I put 2 in "C2" and 10 in "C3"
it shows002 and 010.

When I run the macro i goes from 2 to 10 instead of 002 to 010.

I tried Range("C2").Value.NumberFormate = "000" This gives me a
Run-time error "424" : Object required

Gratefull for any hints to solve this problem.


--
Alf
------------------------------------------------------------------------
Alf's Profile: http://www.excelforum.com/member.php...fo&userid=7112
View this thread: http://www.excelforum.com/showthread...hreadid=553424


 
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
check if a number is integer or fraction Munir from Qatar New Users to Excel 2 April 5th 23 02:54 PM
Number formate Abdul Shakeel Excel Discussion (Misc queries) 2 February 29th 08 03:45 PM
Calculating time in Number Formate [email protected] Excel Discussion (Misc queries) 3 October 18th 07 04:49 PM
Identifiyng an integer number from a floating one Jepane Excel Discussion (Misc queries) 1 June 14th 07 11:27 PM
Convert text number to number formate [email protected] Excel Discussion (Misc queries) 2 April 9th 07 10:48 AM


All times are GMT +1. The time now is 11:55 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"