Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro about data entry with double counter
Hi all,
I want to enter data in a new spreadsheet in the following manner: The first entry will be NF06046V01. The counter after the "V" will go up to 5. Then the counter 046 will be 047, and the counter after the "V" for this counter will start from "01" and go to "V05". Then we will go to raise the first counter by one again. until that first counter reaches to 300. i.e.The first 11 entries will be NF06046v01 NF06046v02 NF06046v03 NF06046v04 NF06046v05 NF06047v01 NF06047v02 NF06047v03 NF06047v04 NF06047v05 NF06048v01 .... Thanks for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro about data entry with double counter
do you want this as a formula or a macro -- mudraker ------------------------------------------------------------------------ mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473 View this thread: http://www.excelforum.com/showthread...hreadid=536698 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro about data entry with double counter
Select the sheet you wish to add the sequence and run the macro below
........ Sub LoadData() Dim xFirst As Integer, xSecond As Integer, xRow As Long xRow = 1 ' first row to start the sequence With ActiveSheet For xFirst = 46 To 300 For xSecond = 1 To 5 If xFirst < 100 Then .Cells(xRow, 1) = "NF060" & CStr(xFirst) & "v" & CStr(xSecond) Else .Cells(xRow, 1) = "NF06" & CStr(xFirst) & "v" & CStr(xSecond) End If xRow = xRow + 1 Next xSecond Next xFirst End With End Sub -- Cheers Nigel wrote in message oups.com... Hi all, I want to enter data in a new spreadsheet in the following manner: The first entry will be NF06046V01. The counter after the "V" will go up to 5. Then the counter 046 will be 047, and the counter after the "V" for this counter will start from "01" and go to "V05". Then we will go to raise the first counter by one again. until that first counter reaches to 300. i.e.The first 11 entries will be NF06046v01 NF06046v02 NF06046v03 NF06046v04 NF06046v05 NF06047v01 NF06047v02 NF06047v03 NF06047v04 NF06047v05 NF06048v01 ... Thanks for any help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro about data entry with double counter
Thanks Nigel....
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Double Entry table | Excel Worksheet Functions | |||
Double entry problem | Excel Discussion (Misc queries) | |||
Double entry | Excel Discussion (Misc queries) | |||
Double entry lookup | Excel Worksheet Functions | |||
Double-click entry | Excel Programming |