Incrementing Serial Numbers With Send Key Function?
Oct 3, 2013
I am trying to get Excel to write a series of incremented serial numbers to an external program.
I need 10 per line, then for the code to send ENTER and start writing on the next line. Following is my current code:
For i = 0 To qty - 1
SendKeys prefix_sn & next_sn + i & ","
Next i
View 6 Replies
ADVERTISEMENT
Aug 20, 2014
following issue:
The following table is given:
flower
20
rose
flower
21
rose
[Code] ........
Which needs to be turned into:
flower
20
22
rose
flower
31
32
blossom
tree
1
3
apple
The last column is the one that dictates when a new range of numbers start. There should be one range of numbers for Rose, One range for Blossom etc.
View 4 Replies
View Related
Mar 11, 2009
I'm putting together a document where I'm trying to automatically create a reference number for each entry. The reference number needs to consist of a site ID (found in column A), an underscore, and then an incrementing number dependent on how many entries the reference number appears.
For example, in column A, the first time the site ID: 12345 appears, I'd like the reference number 12345_01 to be created. The second time it appears, the reference number would be 12345_02. And so on.
If possible, as illustrated above, the first nine references need to have a 0 before the number - i.e. 01, 02, 03, etc - when it hits the tenth instance the reference becomes 10, 11, 12, etc.
I've tried to solve this with COUNTIF, but cannot get it down.
View 2 Replies
View Related
Jun 6, 2008
Incrementing line numbers is a simple task.
If line Identification starts with
AA
AB
AC, why doesn't the same rules apply?
Highlight the cells then click and drag the corner down.
View 9 Replies
View Related
Feb 25, 2009
I currently have a project i am working on based on a invoice system and in my case it is to do with Van rentals. what i am looking to do is create a macro so that when the user clicks the order van button, it brings them to the order page and automatically creates an invoice number which is automatically added to the invoice database along with the customers details and the date of the invoice in a different sheet.
i have been browsing various forums and tutorial and have come across an a piece of code that is incrementing numbers each time the button is clicked. I can add the first set of details to the invoice database however i am unable to create a new row which copies the formulas and just change the invoice number as it is incremented - it just copies the same number
Now i am a complete novice in using VB and i have knowledge to an extent using excel. Is it possible to do that?
Sub test()
'
' test Macro
Sheets("Invoice List").Visible = True
Sheets("Customer Menu").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Customer Van Order Form").Visible = True
ActiveWindow.SmallScroll Down:=-12
Sheets("Invoice List").Select
ActiveCell.FormulaR1C1 = "='Customer Van Order Form'!R[7]C[6]:R[7]C[7]"
ActiveCell.FormulaR1C1 = "='Customer Van Order Form'!R[7]C[6]"
Range("B2").Select.............
View 9 Replies
View Related
Jan 22, 2009
I have a dynamic list of items which I have to assign serial numbers to.
If the serial numbers go in sequence, it would have been easy.
But the problem is, they don't.
They go from A1 - A9, B1 - B10, C1 - C10 ....
Is there a way I can assign an array to ensure that once the macro hits A9, it starts from B1, and once it hits B10, start from C1?
View 9 Replies
View Related
Jun 26, 2008
I need to create a purchase order page whereby each item is then transposed into seperate sheets detailing the product along with price etc. I need the po number to be automatically generated to follow on from the previous therefore giving us a continuous po thread. I also need the purchase order as typed to be saved into a seperate sheet / file each time so that the po is always blank when someone else creates a new post
View 4 Replies
View Related
Jan 11, 2013
I have one page in excel to print. But I want to print it 1000 times and on each paper i need another serial number. How do I do this?
View 4 Replies
View Related
Oct 16, 2004
Sheet4 in my book looks like this:
.............A.......................B................................C..................
I......Invoice No
..
Starting Serial No
...
Ending Serial No
2
ND12
..6011000000013652
. ..6011000000103652
3
ND13
..6011000000116526
....6011000000246977
4
RF4
.
.6006000001255724
..
6006000011249564
5.........RF4...........6005000000023652.........6005000000095624
note that the last 4 numbers of the series are randomly generated for security reasons and are not part of the range of the the serial Nos
So Invoice ND = 10 consecutive numbers, Invoice ND13 = 14 and Invoice RF4 = 1000 and RF4(again) = 8
The list on this sheet is a mile long
What I need is a search box with two windows in it
In one box I will type a serial number and in the second box I will get the Invoice number
The challenge is that the serial number could be between Starting and Ending serial Nos thus if I were to type serial number
6006000001086598 in the first box the answer in the second box will be : RF4
View 9 Replies
View Related
Nov 20, 2008
I have in my sheet from C13 to C350 many serial numbers which I manually type them in. These serials are 5 digit numbers, and I was just wondering if there's a function or formula that will not allow duplicate numbers in that column.
View 9 Replies
View Related
Aug 4, 2014
I have a spreadsheet with a list of about 3800 lines of dollar values in "K" that correspond to various serial numbers in "E".
These serial numbers come up multiple times at different place throughout the 3800 lines.
I know by using SUMIF I can calculate the total value of each serial number, but is there a way to bring the serial numbers across to correspond to the sum of the dollar values?
View 5 Replies
View Related
Apr 16, 2014
I have repeating 7 names in A column.(Like a name group)
Each group names repeating after a blank(empty) row.
I want to write to B column for each repeating names from 1 to 7 as number value.
View 2 Replies
View Related
May 31, 2014
I have a userform for keeping records and would love to incorporate a new feature. I would want to generate a random serial number for each entry made with the userform.
View 2 Replies
View Related
Oct 10, 2008
I've modified this macro I found on this forum, all it does is compares 2 lists of 6 digit serial numbers and and then tells me which numbers are in list 1 that are not in list 2.
However, I want to modify it so that it also gives me the numbers in list 2 that are not in list 1 (put into column F). I then need it to cut the matching serial numbers (in columns A and B) from sheet 1 and paste them into sheet 2.
View 5 Replies
View Related
Jan 20, 2010
Put serial numbers against row like above either by the help of formula or either by VBA code.
SrDePNo.Truck No.Vehicle Type
16384LZR7793SM
46385TLC964C
56386LES7540T
66387LES4982T
76388LES 6509T
86389K4470T
96390LWC3070SM
-6391LWC3070SM
106392AJKA 7595T
116393RIC8879T
126394W1649T............
View 9 Replies
View Related
Feb 27, 2014
my spreadsheet has duplicate serial numbers in column A and the corresponding row in column B has mutliple descriptions for the same serial number. I need to combine those descriptions into 1 cell rather than having multiple rows for the same serial number. is there an IF formula that I can combine with a concatenate that will capture what I need?
View 1 Replies
View Related
Dec 10, 2012
I want to make continuing serial numbers in excel in order to print labels to be able to track my deliveries. i know i can drag the fill cursor to automatically make it go the next number. however i also want my serial number should represent the month and the day the invoice was printed.
for example i want the serial number should be
column a (Jan 01) column b (Jan 02 ) column c (Jan 03)
a1-01-01 a1-02-01 a1-03-01
a1-01-02 a1-02-02 a1-03-02
a1-01-03 a1-02-03 a1-03-02
The first number represents the month (example -a1 for Jan)
The second number represents the day and
The third number represents the invoice
How can i make that when i pul the cursor down it should continue with the invoice number
However when i continue right it should move the day number?
View 2 Replies
View Related
May 26, 2006
i have a list of serial numbers in a column, say column a, for example, and i have corresponding data in columns to the right of this, say just column B for example- I also have a header on column B which counts the data in column b. (just a COUNTA, counting occurences of 'x' )
my issue is this: i need to limit the range of the COUNTA dynamically- by the number of serial numbers in column A. for example: if i have 10 serial numbers, i want my COUNTA range to be B1:B10 (excluding header) and... i need this to be a built-in formula, NOT a VBA macro. i need it to update automatically, as soon as another serial number is entered. i've tried using references to named ranges and all sorts of language tricks, and i cant seem to get it to work. (such as:
' =counta(b1:namedrange1)
i'm going to have to do the same thing with COUNTIF's, so if that is also easily explainable,
View 9 Replies
View Related
Oct 3, 2012
i Am trying to get this project underway and can attempt this manually in excel but will take ages. I was wondering if there is a code I can use. I am trying to get a 7 character alphanumeric serial number for units as a 4(alpha) and 3 numeric number. like say AAAA001 , i want to list on a row all the numbers on a sheet right upto ZZZZ999
View 5 Replies
View Related
Jul 23, 2014
how to properly write this kind of commands!
v_1 = Sheets("WB_Input").Cells(i, 2) 'It's gonna be a numeric value like 10
v_2 = "E"
v_3 = Sheets("WB_Input").Cells(i, j) 'It's gonna be a numeric value like 12
Sheets("WB_Output").Cells(i, j) = "=CONCATENATE(" & v_1 & "," & v_2 & "," & v_3 & ")"
Thing is once I look at the WB_Output Sheet what I see is an error and the cell shows this: =Concatenate(10,E,12)
So logically the problem is that I need to make it show up as =Concatenate("10","E","12")
Btw, I can't just put v_1 & v_2 & v_3, cause Excel understands "E" as exponential!
View 1 Replies
View Related
Sep 7, 2008
I used Scheduled Task to set up my spreadsheet to open daily. I have the code with assistance to pull out the due date items and place them into an email.
I have come across XLSTART/AUTOEXEC/ACTIVATE...ETC...
But cannot figure out the code that will automatically "enabling macro" once Scheduled Task opens the spreadsheet?
Then once the macro runs, the email with the due dates, how can this auto send without user interaction?
(currently I would have to hit send)
I am trying to make the process totally automated to open the spreadsheet at a certain time, send the email with due dates and close the spreadsheet.
Following code in ThisWorkbook--
Private Sub Workbook_Open()
Check_Date_Send_Mail
End Sub
Code in Module1--
Option Explicit
Sub Check_Date_Send_Mail()
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Dim rnDate As Range, rnValue As Range
Dim stAddress As String, stMsg As String
Dim stRecipient As String, stSubject As String
Dim stPost As String
Set wbBook = ThisWorkbook
Set wsSheet = wbBook.Worksheets("Sheet1")
With wsSheet
Set rnDate = .Range("d2:t23")
End With
View 9 Replies
View Related
May 16, 2007
We use proprietary software to connect to an oracle database. The proprietary software has its own login form. I connect to 4 or 5 different databases randomly throughout the day. I wrote a script that I thought would alleviate my login woes but it doesn't work. The login, password, and database info get sent to the form but they all end up on the login line. Instead of the tab character being sent, I get a Beep generated for each line of code that is supposed to send the tab key code. My code is below and is stored in a *.vbs file.
setwshShell =wScript.CreateObject("WScript.Shell")
wshShell.AppActivate "Title Of My Login Form"
wScript.Sleep 100
wshShell.SendKeys "My Login Name"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "My Password"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "Name of My Database"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "~"
View 8 Replies
View Related
Jul 12, 2014
I have used a database template from this site and changed it to suit my needs but I have a bit of a problem with some of the code. I know how to update the worksheet with the relevant userform text fields and in another project I did I have successfully sent userform text fields in the body of an email.
For this project I want to update the worksheet AND send an email at the same time. However, using the two pieces of code together is causing an error that I can't seem to solve (using my very limited vba knowledge!). The code I am working on is below and I have highlighted the line that is getting the error message. C
VB:
Private Sub cmdSubmit_Click() 'Submit new record
Dim ws As Worksheet, lRow As Long, Str As String [code]....
View 1 Replies
View Related
Mar 11, 2014
I am trying to write a macro to send mail on every Friday and also on last day of every month. If the last day of the month falls on Saturday or Sunday then the macro should mail on Friday. I have written a separate macro to send a mail. I have also written to check day(ie Monday, Tuesday etc) of today. If today is Friday or month end i can send mail. I dont know how to tell the macro to send mail on friday if the month last date is saturday or sunday.
Sub done()
Dim Dat As Date, x As Integer, y As Date, sorry As String
Dim str As String
sorry = "Today is not friday or month end. So i cannot send mails"
str = WeekdayName(Weekday(Now()))
[Code] ........
View 1 Replies
View Related
Nov 24, 2008
Im trying to create a catalogue for our complaints that come in each day at work. Ive created a basic layout I like, it uses 3 cells for a week day and 1 cell for a weekend day. The date is listed on the side of each day. I would now like to be able to quickly use this format for the rest of the month/year but need a way to do this easily as I cant do each day separately in the future. Ive tried selecting cells and then dragging down but all it does is repeat the previous 7 days and the same dates instead of incrementing the date.
Ive attached an image ...
View 2 Replies
View Related
Jan 10, 2010
Im using the following HLOOKUP formula : =HLOOKUP($B$14,$DA$15:$EH$380,2,FALSE) and I need to drag it down 365 times, but the row index num, ie 2 does not increment with the drag. Is this correct or is there a way of making the 2 increment?
View 3 Replies
View Related
Oct 1, 2008
If I'm in a worksheet and I spot a row I'd like to copy into my second worksheet, how do I arrange to have it increment the rows?
EX: searching through a worksheet, I see a suspicious entry. I want to copy it into another worksheet. I use the macro. I go back to the original worksheet and see another suspicious entry that I'd like to copy. I'd need a macro that would copy the active row from sheet one, and increment the rows on sheet two before pasting.
View 3 Replies
View Related
Dec 14, 2007
I create inventory cards and each needs a unique 4 character sequence number. Currently I have it set up with 4 cards per sheet. If I need to print more than 4 cards, the worksheet will print one sheet of 4, reset itself and increment the sequence number by 4 and continue this cycle until I've printed the number I need.
Currently I have it only using numbers. I start at 1000 and it increments, by 4, up to 9995. Once it reaches 9995 or higher, the increment resets to 1000 and starts over. The problem I am facing is I am now starting to get several cards that have the same "unique" sequence number. What I would like to do is change it from numerical sequencing to alphanumeric sequencing.
This is the code I currently use for the incrementing....
View 9 Replies
View Related
Nov 19, 2008
In one of my rows I am a referencing another sheet:
The formula is =Sheet2!e4. In the row below it I have =Sheet2!E8. Now is there a way to drag these formulas down so they keep incrementing by 4?
View 9 Replies
View Related
Jul 31, 2006
I've got above basic VBA knowledge and learning very quickly (largely due to great forums like this) I'm now creating a userform for the first time. I'm trying to create a New Supplier form and one of the fields is going to be for Supplier ID where it takes the first 6 letters of the Supplier name (entered by the user) & tags on '001' at the end. I've managed to do this but I would like some code to search existing supplier ID's ( Column A on separate sheet) and check whether the ID created already exists and if it does add on '002' instead of '001'.
SO for example..
If user creates a supplier called Microsoft the supplier ID will be Micros001 - this I can do, but if Micros001 already exists then it will generate an ID
Micros002, Micros003 and so on...
View 3 Replies
View Related