Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default help with macro about data entry with double counter

Thanks Nigel....

Reply
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
Double Entry table Mnilo Excel Worksheet Functions 3 July 9th 06 06:30 PM
Double entry problem Jesper Perregaard Excel Discussion (Misc queries) 1 August 18th 05 11:26 AM
Double entry Rob graham Excel Discussion (Misc queries) 6 June 21st 05 08:05 AM
Double entry lookup Al Eaton Excel Worksheet Functions 2 December 13th 04 03:25 AM
Double-click entry RJH Excel Programming 2 February 3rd 04 02:27 PM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"