Auto Generate Unique Number
VBA that autogenerates a unique number when a cell in excel is filled?
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Auto Number Unique Values
I have an excel sheet that has multiple rows for one PO number. I've created a row at the top to calculate all of the unique PO numbers in the sheet. However, I want to create another column that will give each unique PO number it's own ID number starting at 1. For instance: Column B (PO Number) 4  Counts unique values in B 219 219 219 220 220 221 222 222 Then in Column C I'd want 1 (unique number for 219) 1 (unique number for 219) 1 (unique number for 219) 2 (unique number for 220) 2 (unique number for 220) 3 (unique number for 221) 4 (unique number for 222) 4 (unique number for 222)
View Replies!
View Related
Generate Unique ID
on generating a unique ID for each row in a spreadsheet. My current manually entered ID numbers are alpha numeric, so I want to use a formula or macro to follow the same format. For example the IDs may be ABC001, ABC002, AAA001, AAA002, AAA003. So user enters info in a form built in excel, and I run a macro which takes the data entered into that form and populates another spreadsheet and I assign an ID number. The ID number should look for the next number in the sequence, based upon the first three characters.
View Replies!
View Related
Generate Unique Log In Passwords
I have a list of email addresses stored in an Excel file (column A). I need to generate some passwords basing on these email addresses which would then be automatically stored in the same row as the passwords, only this time in column B. The passwords could be numbers based on some text to number conversion (which I could additionally add some mathematical operation to, to make the password harder to crack). The passwods would then be distributed among the owners of these email addresses.
View Replies!
View Related
Generate Unique Random Numbers
I want to generate numbers (1 to 15) in cells A1 through O1, but the number in each cells should be unique compare to the other cells, how can I do it? If I use =randbetween(1,15), I can not get unique number in each cell, some numbers are duplicated.
View Replies!
View Related
Add & Generate Unique Numbers In Column
I want to add & generate unique numbers in a column of similiar words.. For Instance: RED RED RED BLUE BLUE BLUE etc..etc.. I want it to look like this: RED1 RED2 RED3 RED4 RED5 BLUE1 BLUE2 BLUE3 I want infinite numbers next to the same wording but unique. I have 2 rows A & B.. NAME & MOBILE PHONE Title in line 1 I am not to familiar with excel. Step by Step please, anyone out there. I saw a similar posting, but the formula did not work out for me. Then i am going to save the file as a CSV
View Replies!
View Related
Generate Unique Values From AutoFilter Result
I'm trying to use Advanced Filter to generate all the unique values within a list, only at times I want to Autofilter the data, then use the advanced filter to determine all the values of the slimmed list. For some reason, this works fine on column A, only returning the values that begin with a 1 when the column is filtered for all values beginning with 1. However, when I run the advanced filter on column 2 with column 1 filtered to all beginning with 1, all values all returned regardless of whether column 1 criteria is met. Either way, after the advanced filter, the autofilter has been removed.
View Replies!
View Related
Auto Generate List
I have an event that is one week long (7 days), with three functions happening each day (7 days  3 columns per day). There are 11 groups with various number of possible attendees listed in rows. Attendees of a given function is indicated by entry of a 1 or 2 (attending partner), Blank = not attending. I would like to show a list of the attendees for a given function by clicking or moving my mouse pointer on the event function column header. The list would need to be automatically updated when the attendees status changes (entry or deletion of 1 or 2)
View Replies!
View Related
Auto Generate Table For Scatter Graph
after spending hours searching the forum, I begin to seriously doubt my ability to even formulate a suitable search question. My problem SHOULD be a known one, but I am unable to find any clues. Here we go: I have made a pretty strightforward forecasting model. It is used to calculate economics of a coal fuelled power plant (even though that shouldn't matter). The outcome is, among other things, a single number for Profit / MWh in Euros. There are several input data, such as fuel price, price for CO2 emission rights, operational expenditure, capex, etc. My idea, then, is to lock all indata parameters except ONE, then let this variable vary incrementally and then produce a new small table with a) the variable data (example: price for CO2 rights ranging from 10 to 50 Euro in 2 euro steps), and b) the resulting net profit in each case. Ideally, I wish to be able to chose which indata to lock and which to vary, i.e. solution need to have certain flexibility. NB: The calculations are not that simple, i.e. I cannot use a simple formula  I need to use the exising output cell(s) to feed data. How do I do this? The outcome should be basically two rows with a suitable number of columns (or the other way around, two columns in X number of rows). The table will then be used to produce illustrative graphs. I guess I could hard code a table by simply enter data, but heck, that's not the way to use Excel!
View Replies!
View Related
Auto Generate A Comment Box Based On A Cell Value That Has Variable Reference Cells
I have been given the following code and it works great. I now need to adapt it to the following scenario: In the attached sheet, the user has to select either, "Suburban" or "Squad" in row 5. If the user selects, "Suburban" I need this script to compare the values they enter in a given row to the value in column "B". If the user selects, "Squad" I need this script to compare the values they enter in a given row to the value in column "C". Look at row 48, for example. If the user enters, "Suburban" in cell D5 then the value they enter in cell D48 should equal "1". If it does not equal "1" then it should proceed with the adding of a comment. Conversely, if the user enters, "Squad" in cell D5 then the value the enter in cell D48 should equal "2". If it does not equal "2" then it should proceed with the adding of a comment.
View Replies!
View Related
Generate Random Number
is if there is a way to generate random numbers between 0001 and 9999. I always need to always have 4 digits. The first couple of numbers can be 0 so that I can maximize the number of variations.
View Replies!
View Related
Generate Random Number Between
i have worked in access using vba procedures. i can easily create a form in access that generates a random integer number between 0 and 20 and the user will guess the number between 1 to 20 if the random number is 16 and the user enters 14 the program will display a msg box saying too low or too high. here is the code . Option Explicit Private Const MAX = 20 Private Const MIN = 1 Private iKey As Integer Private lTries As Long Private Function Random() As Integer Random = CInt(Int((MAX  MIN + 1) * Rnd() + MIN)) End Function Private Sub cmdGuess_Click() Dim lGuess As Long now i have to do the same thing in excel create a program that will ask the user to enter numbers between 0 to 20 and see if the random number and user guess is same or not. but i have never worked in excel using vba procedures how can i achieve the same thing in excel using a vba procedures.
View Replies!
View Related
CommandButton Generate Number When Pressed
I want to get number (going from 1 to 15 (for example)) when i click on commandbutton (on userform without textboxes, combos , etc, ..... except only one commandbutton)! In other words, when i click on commandbutton, i want to get (on msgbox) number 1, then when i click again on commandbutton, i want to get number 2, then when i click on it third time, i want to get number three on msgbox window, and so on until i close userform!
View Replies!
View Related
Code To Generate 'date' Ref Number
each time a button is clicked I want a new ref number to be produced and displayed on my userform. I can't however create the code to generate this ref number. In column A of my 'sweeplog' worksheet is where I want the ref number to be placed. This ref number is simply made up of today's date  in format ddmmyy eg 240408 for today 24th April 2008 then add the number '1' if its a new date or the next number in coulumn A if not. for example In column A I have these 3 ref numbers A2 = 2404081 (24th April 2008 plus 1 as this is the first ref used today) A3 = 2404082 (as above but with 2 added) A4 = 2404083 (as above but with 3 added) now tomorrow the next ref number that would be shown in column A (after the user clicks the button) would be as follows..... A5 = 2505081 (25th April 2008 plus 1 as this is first ref used on 25th) I am able to get this unique ref number to show in my userform but can't figure out how to produce the code to generate it
View Replies!
View Related
Generate A Random 9 Digit Number
I have a spreadsheet with approx 11,000 rows and I would like to generate a unique 9 digit number for each line. I know I could just put 100 000 000 and then increase that by one all the way down but I was wondering if there was any formula or code
View Replies!
View Related
Auto Assign A Unique ID (primary Key)
I know it is possible in Access auto assign a unique ID (primary key?) to each record in a table. I am creating records in a table using Excel and Visual Basic to write to a ".mdb" file without using Access. Is there a way to auto assign a unique ID within the coding? The reason I ask this is if I had two users writing to the ".mdb" file at the same time, I don't want them to end up with the same ID's for two differend records. Sub UploadRecord() Dim DBName, DBLocation, FilePath As String Dim DBConnection As ADODB.Connection Dim DBRecordSet As ADODB.Recordset Dim XLRow As Long, XLColumn As Long Dim DataRange As Long Application.DisplayAlerts = False Application.ScreenUpdating = False Worksheets("Find Record").Range("A2").Value = Worksheets("Index").Range("H3").Value Worksheets("Find Record").Range("B2").Value = Worksheets("Index").Range("I3").Value Worksheets("Find Record").Range("C2").Value = Worksheets("Index").Range("J3").Value Worksheets("Find Record").Range("D2").Value = Worksheets("Index").Range("K3").Value Worksheets("Find Record").Range("E2").Value = Worksheets("Index").Range("L3").Value Worksheets("Find Record").Range("F2").Value = Worksheets("Index").Range("M3").Value Worksheets("Find Record").Range("G2").Value = Worksheets("Index").Range("N3").Value Worksheets("Find Record").Activate.........................
View Replies!
View Related
Auto Add Unique Id When Duplicate Numbers Exist
I receive a csv spreadsheet in which Column A contains ID's like this LSX23268370.944849537037037 LSX23181010.445011574074074 LSX23181010.444930555555556 LSX23399640.612361111111111 LSX23399640.612395833333333 LSX23399640.612407407407407 LSX23399640.612395833333333 LSX23399640.612395833333333 LSX23399640.612407407407407 LSX23399640.612407407407407 As you can see, some of these are identical. Fort example there are 3 copies of LSX23399640.612395833333333 I'd like to run a macro that effectively looks for duplicates and appends a letter to the end so the example above I would end up with.. LSX23268370.944849537037037 LSX23181010.445011574074074 LSX23181010.444930555555556 LSX23399640.612361111111111 LSX23399640.612395833333333a LSX23399640.612407407407407a LSX23399640.612395833333333b LSX23399640.612395833333333c LSX23399640.612407407407407b LSX23399640.612407407407407c
View Replies!
View Related
Auto Updated  Filter Unique Records
A worksheet has a column named "Grade". There are may entries into this column, and most are used multiple times. I'd like a list in another location (to use in a list box on a user form) that contains all of the unique entries in the "Grade" column. I know how to do the Advanced filter for unique records, but when I add different grades to the column, the filtered list does not update to reflect the addition. Do I need to run a macro to run the filter after every new entry?
View Replies!
View Related
Add Auto Filter (unique Records) Option To Macro
I have been modifying a workbook and the original macro will send to the sheet Results once the "Search" button is clicked, but I have found that this macro is displaying duplicate records. Can anyone help me put in an auto filter to find only unique records? My second workaround option is if someone can help me remove the go to/select sheet option from the "Search" macro so that a user will not automatically be sent to the Results tab and will instead hit the "Confirm Category Selection" button (which auto filters before sending the user to the Results tab).
View Replies!
View Related
Number Of Unique Contacts
Client Id Contact No. Unique Contacts 111123 12 3 111123 12 3 221123 2 2 111123 34 3 111123 5 3 221123 1 2 821123 4 1 221123 2 2 I am trying to calculate the number of unique contacts that each client has made. So in the example above Client No. 111123 has made 3 unique contacts  numbers 12,34 and 5. However I'm not having any luck  as I suspect it will be a fiendish array formulae. Alternatively I'd settle for some VBA.
View Replies!
View Related
Unique Number In Column
Need to find a way to flag the unique number in column with 641892 20579880380121611AAAAA########700020579880380121611641892########592620579880380121611642176########534420579880380121611646570########630320579880380121611645812########562320579880380121611643573########559120579880380121611640502########624820579880380121611645723########585920579880380121611645818########616620579880380121611641295########557120579880380121611643574########614520579880380121611640079########630420579880380121611640450########612520579880380121611645494########573920579880380121611644573########518320579880380121611643595########518420579880380121611645404########564420579880380121611646669########578120579880380121611646890########630520579880380121611646013########630220579880380121611646755########518220579880380121611642278########527320579880380121611641892########792620579880380121611640787########518020579880380121611640774########5426
View Replies!
View Related
Get The Number Of Unique Records In A List
Here is a sample of data that I have: code name lastname TS19SylvainBrook TS19SylvainBrook TV04ValérieMusoni TV04ValérieMusoni VB05BenValiquette VB05BenValiquette VB05BenValiquette VI02IsabelleVanasse VR07RichardVivo VR07RichardVivo VR07RichardVivo WD01DanyWilliams WD01DanyWilliams WD01DanyWilliams How can I quickly get the total number of employees from a list like this one? the first field is a unique key (1 code per employee) In this case, the desired result would be 6. (the count function does NOT give the desired result..)
View Replies!
View Related
Lookup First Unique Number And Return
Im trying to lookup the first unique number in a column in a separate workbook and then return the value then the cell below would lookup the next unique number and return the value 91010111112121313700 700 700 7009929921442144218341834185018501892189219181918333433343400 3400 3400 3400347634763534
View Replies!
View Related
Assign Unique Number To A String
I'm currrently using column I and col J in col I are all the units of measurement: KG, PKT, BAG in ColJ is the formula to return: KG as 9999999 PKT as 8888888 BAg as 7777777 if(i2=kg, 999999999,"false!") i was thinking of using if....but triple if formulas would be long isn't it? PART2 of this would be using: =IF((SUMPRODUCT((db!$A$2:$A$36000=$B$1),(db!$F$2:$F$36000=C$5),(db!$G$2:$G$36000=C$6),(db!$E$2:$E$36000=$A7),(db!$D$2:$D$36000=$B7),db!$I$2:$I$36000))=9999999,"KG","Invalid") to check 5 values and if it is 999999999 it'll return KG 8888888 PKT 7777777 BAg
View Replies!
View Related
Counting Unique Number Of Items
I want to paste a list of customers into a sheet and then have a formula that counts the number of customers. So, even if a customer appears 10 times it would only count it once and and continues down the column and counts the next company name and so on. Then it gives me a total of the number of different companies in that column.
View Replies!
View Related
Check Number Uses Unique Digits
I would like a function that checks an input number to see if it contains unique digits. If the digits are unique the output is 1 else the output is 1. Thus, supposing we call the function UNIQ(), we find UNIQ(15423) = 1 but UNIQ(154532) = 1. The input is always a positive integer.
View Replies!
View Related
Counting Unique Instances Of A Number
I found the following formula online while searching for how to count unique instances of a number in a list. The list may have blank cells or repeated numbers but this formula works. =SUMPRODUCT((A1:100<>"")/COUNTIF(A1:A100,A1:A100&"")) So my question is...can someone verbally explain just exactly what is going on? i.e. I don't understand the <>"" in the sumproduct argument or the &"" in the second argument of the countif.
View Replies!
View Related
Send Mail With Attachment Of Csv With Unique Number
The file which I want to send as a CSV needs to be named in a certain way. It would be the contents of cell A2, then the date it was sent and the time. Here is my current code. How can I get it to pick up data from a cell and then add it to the list. Also, the list has to be one string, so for example, 23459 Cell A2, 1310 Date and 192859 would be time. So the renamed file would be named 234591310192859. Here is my code which may make what I'm saying a bit more into a bit more sense. Currently the name which is outputted is 'Name of Spreadsheet.xls 13Jan10 193159'.
View Replies!
View Related
Counting Number Of Unique Items In Column
I am trying to count the number of unique items in a single column (~5,000 rows of data). For example, I may have the following data a1 = apples a2 = pears a3 = oranges a4 = apples a5 = apples a6 = apples a7 = pears in this case number of uniques items is 3 Right now I am using a Pivot Table to figure out the number of unique items but I am sure there is an easier way to do this.
View Replies!
View Related
Count The Number Of Unique Numbers In A Column?
I have a column where I have record numbers. The record number can end up duplicate in some cells. PROBLEM_ID IBM02204732 IBM03252238 IBM03252238 IBM03335648 IBM03534918 IBM03534918 IBM03862015 IBM03862015 IBM12737629 IBM12737629 IBM17269762 I would like the get a formula that can count the number of unique numbers in that column? I would like to get if possible to get a formula that summarize the number into a single cell.
View Replies!
View Related
Count The Number Of Unique Numbers In A Column
i'm currently trying to count the number of unique numbers in a Column using this formula: =SUMPRODUCT((A3:A3002<>"")/COUNTIF(A3:A4002;A3:A3002&"")) So far so good.....But I want to add some conditions like only count the numbers that meet the condition say N1:N3000="SE*" =SUMPRODUCT((A1:A3000<>"");(AND(OR(N1:N3000="SE*";N1:N3000="INC*")/COUNTIF(A1:A3000;A1:A3000&"")))) On this one I get #VALUE! and i can't figure out why. I have also tried to put the AND/OR condition before the actual starting of the array of the SUMPRODUCT but nothing.
View Replies!
View Related
Total Number Of Unique Matches In Two Columns
Column A = numerical IDs, multiple entries, may have duplicates that should only be counted once in comparison Column B = numerical IDs, multiple entries, may have duplicates that should only be counted once in comparison Need: 1 cell that compares all of the A range to all of the B range and returns a a percentage of repeats. So, if there are 50 entries in A, and only 40 are unique, and B includes 10 repeats (unique, not multiple), then the returned value would be 25%.
View Replies!
View Related
How Do You Create A Unique Random Number W/o Duplicates
I'm needing to generate a unique random value for a database with 3546 cases. The unique random values cannot be duplicates of each other. I tried the =RANDLOTTO function that I learned of in an old post on this board, but that results in "#NAME?" appearing in the first cell. I tried to install the AddIns (both the Analysis ToolPak and the Analysis ToolPak  VBA, but nothing seems to happen. Is there another way to generate these numbers?
View Replies!
View Related
Number Of Unique Customers For Every Possible Product Combination
I am looking for an efficient solution to the following problem. I have a sales table with two columns, titled C1 and C2. The first column lists the product sold, and the second column lists the associated customer. Here's what I mean (though I can't figure out how to create neat columns in this post): [C1] [C2] Prod1 CharlieCo Prod3 AlphaCorp Prod2 BetaInc Prod3 BetaInc Prod1 AlphaCopr......................
View Replies!
View Related
Using Letters In An Auto Number
I have a database to which I am connecting a form, I need to have a unique ID for each record and due to the number of tables need to include letters in my numbering (ex. U00001, for Users; B00001, for Books; and V00001, for videos.) I have adjusted a very helpful macro I recieved from Roy Cox and am currently trying this code on the "user form": Count_Row = 1 DATABASE_RECORDS = Sheets("Users"). Range("B1:B10000") 'To identify the next blank row in the database sheet For Each DBRECORD In DATABASE_RECORDS If DBRECORD <> "" Then Count_Row = Count_Row + 1 RowNum = Count_Row X = RowNum  1 Sheets("Users").Range("A1" & RowNum) = "U000" & X Next DBRECORD This is supposed to find the fill the "A" (ID) column after the "B" Column has been filled. Currently It is placing U0001 in cell A12 when all that is in the sheet is headers.
View Replies!
View Related
Allocating Employee Names With Unique Reference Number
I have been given a database with peoples names that require a unique number to hide/replace the name to hide their identity for a meeting and to act as a ghost system. The problem i have is that some individuals names on the list appear more than once so i cannot simply call Joe Bloggs number 3 as he can appear further down the list at number 120. I was wondering is there is a way to do this without manually replacing each name with a number and making and logging the persons name that corresponds to the number. as there are 600 names and some can appear up to 4  5 times!
View Replies!
View Related
How To Count The Number Of Unique Values In A List, Based On Another Value
I need to count the unique values in a list based on another value. i.e. AB ___ Jones AB ___ Smith BC ___ Henry AB ___ Jones BC ___ Brown BC ___ Henry AB ___ Tomkins For all the AB's in column 1, I need a formula that will give me all the unique names from column 2, in this case 3. I've tried adapting: =IF(LEN(June!D5:D100),SUMPRODUCT(1/COUNTIF(June!D5:D100,June!D5:D100))) but haven't been able to get it to work.
View Replies!
View Related
Formula To Find Lowest Unique Number In Series
I'm holding a Reverse Auction where people pay a dollar to place a bid, BUT the twist is they are giving me a number that they how will be the lowest number but it has to be the only occurrence of that number (greater than 0). During the party people can guess as much as they want to pay. I think i'll use a spreadsheet with their names in column A and go out in the row with however many cells for how many numbers they guess (so there would be blank cells in the overall range of the whole list if one guy buys 10 numbers and another only 1, for example). So, i need a cell at the bottom that tells me the lowest number that wasn't guessed more than one time. I've found how to FIND duplicates and the lowest number but i don't know how to write it so that it discards the duplicates.
View Replies!
View Related
Create Unique Reference Number For Data Entry
I'm making a user form in excel/vbe, that will enter data into a worksheet behind the form. I would like to make a unique reference number that is automatically generated by the form as the next in the series. It can be as simple a number as 00001 so nothing too complicated I hope. When the user opens the userform i would like the reference to appear on the form so that they know what it is. Then when they enter the data I want the number to go in the database with all the rest of the info they have entered and also for a message box to come up reminding them to rememeber their number.
View Replies!
View Related
Sumproduct: Determine The Number Of Unique Names In Column
I have 1500+customer names in column C7 of table. I'm looking for a SUMPRODUCT formula that achieves the following 2 logical goals. First, it needs to determine the number of unique names in column C7. It can't just count the rows because many customers appear multiple times in the range. So, I have been using the following formula and it works great: =SUMPRODUCT( ((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&""))) Second, I'd like the formula to tell me how many of the unique names in C7 correspond to public companies. Column C8 of my table indicates whether or not a company is public ("Yes") or private ("No"). So, I've been using the following formula and it seems to deliver the right result: =SUMPRODUCT( ((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&"")) * (COUNTIFS(Table[C7],Table[C7]&"",Table[C8],"Yes")>=1)) But the added COUNTIFS statement seems very unwieldy and indirect to me. Why do I have to examine every instance of a particular company's name when the answer could be determined by looking at any instance of the name  after all, each company in C7 is either public or private, and has the same corresponding value in C8 (whether "Yes" or "No") everywhere that its name appears in C7! So that's my first question: is there a clearer, more efficient way to achieve the same result? My second question has to do with toggling the public company test. What if I create a special cell, say A1, that will always contain either the word "On" or "Off"........
View Replies!
View Related
Count Number Of Rows With Unique Entries In 2 Columns
I have a spreadsheet which is to record quality checks on work carried out by staff. The spreadsheet has a customer reference number in column B and a Staff reference number in column C. I can carry out a number of checks on a member of staff on one transaction, so for instance, I could carry 3 checks on one customer number, which would result in the staff ref number being enetered 3 times (there is 1 check per row). I need a formula to count the number of checks I carry out on each member of staff. My problem is that although 3 checks could be completed on someone, if it is on the same customer NO, it only counts as 1 check. In effect, I need a formula to count the number of staff ref numbers which have a unique customer number eneterd in the adjacent column. All the cust numbers are unique so would I be able to use a wildcard?
View Replies!
View Related
