Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
check if a number is integer or fraction | New Users to Excel | |||
Number formate | Excel Discussion (Misc queries) | |||
Calculating time in Number Formate | Excel Discussion (Misc queries) | |||
Identifiyng an integer number from a floating one | Excel Discussion (Misc queries) | |||
Convert text number to number formate | Excel Discussion (Misc queries) |