![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
LoopP is an integer variable from 1 to 60.
I need to get a string "01" through "60". Simple Str(LoopP) can not work. How to realise this? Another question is to conver it to "0001" through "0060". How? Please give suggestions. TIA |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Bushkill, PA
Posts: 54
|
Use the format command:
Mystr=format(loopP,"00") gives you 01,02, etc Mystr=format(loopP,"0000") gives you 0001, 0060, etc |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|