Linking A Number Code To A Name
Apr 18, 2007
For example, Column D, Rows 2 - 500 contain different number codes:451
461
593
675
I want to match up the number code and replace it with the Course Name.451 = Course A
461 = Course B
593=Course C
675=Course D
I am looking to have the number code, i.e., 451 replaced in Column D with the Course Name, Course A or the Course Name appear in Column E pulling from the number code.
In the end I will probably have 100 unique number codes to match up with course names.
View 9 Replies
ADVERTISEMENT
Nov 7, 2007
I have created a 2 drop down list with varios sizes of steel in 1 and quantity in another.
what i want to do is assign a figure in the steel list e.g 203x203x46 UC = £20 per metre and in the quantity list it will just have the quantity required then i will create a cell with the total, so it would go something like (203x203x46 UC = £20 per metre, quantity = 6, total = £120.
View 14 Replies
View Related
Nov 11, 2011
I want to display a cell with the value -1,000 as Negative 1,000. In custom number formats I have selected #;"negative" #,###;; which does indeed display the cell with -1000 as Negative 1,000, however, I want to be able to link to this cell and have the link pull in Negative $1,000.
View 9 Replies
View Related
Dec 21, 2012
I have letter and number combination code in two collumns and they differ for 10.000 numbers:
BAM98314
BAM88314
BAM90000
BAM80000
As you can see the left code is for 10000 numbers higher. the letters are allways the same. In the event that this isn't so, if difference between codes in same row is more or less than 10000 numbers. I was thinking on making conditional formating so the cells with wrong difference would be marked red, but I do not know how to make formula for this difference.
View 2 Replies
View Related
Nov 23, 2009
is it possible to have boxes for numbers to be inserted into
i want the user to be able to fill in bank account and sort codes numers into the relevant individual box for each number
View 9 Replies
View Related
Jun 25, 2014
I am attempting to build a mileage tracker based on a master list of code numbers. After submitting the date in cell A, in the next cell, B, I would type a code number from the list, say 7. Seven is the massage parlor that is 15 miles away. So 15 would come up in the next cell C.
View 3 Replies
View Related
Aug 4, 2012
i am using the code
activesheet.usedrange.columns.count
to get to know the no of columns used in the data set in a worksheet. bt the problem is it is count the unnessary columns which are not part of the dataset too.
View 9 Replies
View Related
Jun 10, 2009
i need code that can look at cell d23 and take that number( say it is 13) and break it down into groups. that have 3, 4 or 5 per group. in this example 13 can be broken down into
View 3 Replies
View Related
Jul 15, 2009
I would like to add something (formula) to the following code to automatically add a new ID number with each new entry. Some of the entries will have the same name but each time a new entry is added I want the ID number to increase by 1. Assume that the first entry is 0001.
View 5 Replies
View Related
Nov 2, 2011
I use a userform to make sales data entries into a database. The userform contains textboxes for:
Invoice No.Invoice DateGrossVatNet The Invoice No. is the first entry box on the userform and it is important that users enter the correct format (which is alphanumeric).
It is also important that a checking is carried out to ensure that the Invoice Number being entered has not already been used.
I use the following code to ensure that the numbers are entered in the desired format:
Code:
Private Sub txtInv_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If txtInv.Value = vbNullString Then Exit Sub
If (Not UCase(Me.txtInv.Value) Like "ST###") And (Not UCase(Me.txtInv.Value) Like "ST####") Then
MsgBox "Non Valid Invoice Number.â€
Cancel = True
End If
End Sub
And this code is pasted lower down the VB editor window. And it seems to be working fine!
For the checking to ensure that the invoice number being typed into the textbox has not already been used, I use the following two codes combined together:
a) to check for invoice No.:
Code:
check for Invoice Number
If Trim(Me.txtInv.Value) = "" Then
Me.txtInv.SetFocus
MsgBox "Please Enter Invoice No."
Exit Sub
End If
b) And to it I add the following additional code for CHECKING that the no. does not already exist in the database (the invoice nos are located in Column A of the database):
Code:
Dim x
X= Application.Match(Me.txtInv.Value, Columns(1),0)
If Not IsError(x) Then
MsgBox Me.txtInv.Value & "Invoice Number Is Already Used"
Me.txtInv.SetFocus
Cancel = True
Exit Sub
End If
My problem with the second set of codes in (a) & (b) (for the Checking of already existing No.) is that the code allows the user to key in the Invoice No. and go through filling in the other textboxes. It is only after clicking the ‘Add’ button that a msgbox comes up to indicate that the ‘invoice no. is already used’.
I need a tweaking of the codes so that the moment an invoice no. that has already been used is typed into the textbox and the TAB button pressed, a msgbox will show up at that stage to indicate that the ‘Invoice no. is already used’. This will reduce time and avoid filling in the other textboxes and clicking the ‘Add’ button before the checking is done.
View 3 Replies
View Related
Dec 14, 2007
I have the following formula copied down from A3 to A200 in a spreadsheet, which creates a unique standardized customer number for the each names listed in B3 to B200:
=IF(B3="","","S"&LEFT(B3,1)&"-"&TEXT(SUMPRODUCT(--(LEFT($B$3:B3,1)=LEFT(B3,1)))*10,"0000"))
Therefore, with the following names listed in B3 to B10:
UPS
FedEx
Fisher Price
Bell Canada
Grand & Toy
Rogers Cable
Dominion
Blue Jays
The respective customer numbers would be:
SU-0010
SF-0010
SF-0020
SB-0010
SG-0010
SR-0010
SD-0010
SB-0020
I would like these numbers to be static, so I would appreciate it very much if someone can give me a VBA code to replace the formula.
View 9 Replies
View Related
Apr 24, 2008
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 9 Replies
View Related
Jun 28, 2009
I have a workbook with a sheet for each day of the month where guest information is entered. There is a column for each item. There is a summary sheet that summarizes the number of members, guests etc. One thing I would like to track is the number of people from ech zip code.
View 9 Replies
View Related
Sep 3, 2006
i have a simple if statment
If cboname.Value = Sheets("Data Sheet"). Range("E2") Then
txtpay.Value = Sheets("Data Sheet").Range("F2")
End If
this need to be done for a large list of names and input into another sheet. what i wanted to know was if there is a quicker way of doing this code without repeating the code loads of times
View 9 Replies
View Related
Aug 7, 2007
Just a niggling problem, I've got lstRow as a Long and it contains the value of the last row offset by (1, 0). The problem is i'm trying to add it into a range
Range("C500:K500").Select
Selection.autofill Destination:=Range(C" & lstRow &":K" & lstRow &")Type:=xlFillDefault
Like that.. Except i've tried a million different combinations of " and & in different places to try and get it to compile. It refuses too. It always gives the error "Expected list seperator or )" I know I could just do it individually from C to K but I'd like to learn how to do it this way as well.
View 6 Replies
View Related
May 8, 2008
I tried this macro, written by Leith, to organize a workbook of over 100 worksheets, all named as a 3 digit number. (001, 002, 007, 004, 018, 12, etc.)
For some reason, there was no order to the sorting. Can the macro above be modified to sort my sheets in numeric order?
View 9 Replies
View Related
Mar 22, 2006
In column A and B I have text representing an Entity and its Intercompany,
respectively. In column C I have concatenated the two. So now in Column C,
for example, I have "BillTom" in row 1 and "TomBill" in row 900.
I need Excel to convert the text into some sort of code, ASCII or number
that shows they are EQUAL. I need something that shows "TomBill" and
"BillTom" are the same thing, just in a different order.
I cannot build an IF formula or use Find/Replace, as I will have thousands
of these types of combinations.
View 14 Replies
View Related
Sep 5, 2008
I looked for a long time through the past entries and couldn't find an answer for this specific situation. I have a spreadsheet with multiple occurances of names in column A
A
green
green
green
blue
blue
white
white
white
and in column D I need a total of how many occurances of that name there are. that total needs to be listed in that row for that name specifically. There are many names on there currently and many will be added via copy/paste from another spreadsheet so i need one formula to paste into each row to cover ALL recurring names. Basically i need to enter in column D "=COUNTIF(A:A,"a term that would total the reoccurance of each name from the A column the corresponding D cell")
A D
green 3
green 3
green 3
blue 2
blue 2
white 3
white 3
white 3
The goal is to be able to copy/paste new entries into the spreadsheet, sort them by name, and have them automatically update the totals in each row even if they are new names. i guess it would be a "number of occurance of each term" code to cover all terms.
View 2 Replies
View Related
Feb 7, 2013
I need to convert a date into a serial number. The serial number must return the format DDDYYNN where DDD is the day of the year, YY is the year, and NN is the sequential build number. As an example, if 10 units are built on 2/6/2013, the serial numbers would be 0371301, 0371302 ...0371310. Cell A1 would contain the current date (2/6/13) in this example. Column B1 - B10 would be the sequential serial numbers generated by the formula.
View 3 Replies
View Related
Sep 15, 2004
I am trying to create an input sheet with a specified number of rows. My plan was to hide all the empty rows in the table and ask how many rows were required in the table. A button would then be pressed to unhide all the relevant rows thus giving a table of the correct size. My best effort so far looks something like this:
Sub UnhideRows()
Dim i As Integer
Dim myRow As Integer
myRow = Range("A1") + 2
Application. ScreenUpdating = False
For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction. Sum(Selection.Rows(i)) > myRow Then
Selection.Rows(i).EntireRow.Hidden = True
End If
Next i
Application.ScreenUpdating = True
End Sub
the cell to give the size of the table is A1 and the table starts in A3. The first cell in each row has an index number (=row() - 2), all other cells would be empty to begin with. My attempt did not work.
View 5 Replies
View Related
Apr 17, 2008
This is probably a simple question, but I couldn't find the answer by searching...
I have a macro that I wish to run which calls one of two different macro's depending on if the user has Excel version 2007 or if they have an earlier version.
This is to overcome 'Save as PDF', which only works in Excel 2007.
View 3 Replies
View Related
Jan 28, 2014
I've got a big file with a large dataset. One of the sheets works as a screening for the data, so everytime I populate an ID number in say cell C3, the rest of the sheet updates as per the formulas I have in place. However, I need to write a code that takes ID numbers one by one from a sheet, populates them into my screening sheet, updates the sheet and saves it.
View 4 Replies
View Related
Mar 12, 2014
The following code displays the message box and loads a userform if the Active cell offset 1, -1 when within G column equals "LAST ROW".
[Code] .....
How can I change it so instead it performs those same actions (displaying the message box, and loads the userform) if the number of rows between the last data entry in G and the last data entry in F is equal to 0?
View 3 Replies
View Related
Apr 27, 2009
Excel 2003: I need code that, when an "x" is entered in a cell in the "Activity" worksheet to assign a temporary unit #, it will look for the next available Temporary Unit # in the "Assign" worksheet. Then mark that unit # as "assigned" (by placing an "X" in the column next to it) and copy it to a cell in the "Activity" sheet.
I will be doing the same thing with assigning different types of PO numbers. I figure if I have the code for the Unit #, I can use the same logic for the other assignments, with some modifications, of course.
I've attached a sample workbook.
If I am not considering the most effective way to accomplish what I am trying to do here, I have no ego at all about someone suggesting a better solution.
View 7 Replies
View Related
Sep 20, 2012
I have the below code that i am using to generate a random number between a user defined lower limit and upper limit (these limits are set in cells "B3" and "B4" in worksheet "DRAW"), the random number that is generated displays in cell "B7" on worksheet "DRAW".
The code also allows for the draw result to be stored on a second sheet called "DRAW HISTORY", on this sheet the draw result, date and time are recorded (the date and time are stored on sheet "DRAW" in cells "C20" & "C21" and these values are pulled to the result sheet by the macro).
What i would like to happen though is instead of the random number displaying instantly i would like the numbers to cycle for 3 seconds before stopping and the result being recorded. A much better visual effect than an instant BANG here is the winner.
here is the code i am using to generate the random number and record the result:
Sub testRandom()
Dim aRow As Long
Sheets("DRAW").Range("B7") =
[Code]....
View 3 Replies
View Related
Jan 21, 2014
I wrote the following basic code earlier (which will end up being part of a larger code)
Code:
Dim DateInput As String
Dim LastCell As String
Sub LastRowInputBox()
LastCell = InputBox("What is the last row number in the range?", "Last Row Input")
[Code] ......
As you can see, all the ColumnCopyInsert Subroutine does is copy select/copy four columns (E:H), inserts the copied selection immediately to the right, inserts formulas and autofills down to the last row required. I added the LastRowInputBox routine as the range of rows varies from week to week (inserting new rows, deleting others).
The code works great...up to a point unfortunately. If ran as it is, everything that should be copied/pasted will be and cells autofilled to the row specified via the InputBox. Here comes the problem, if any rows are either inserted or deleted then the code throws out "The object invoked has disconnected from its clients" when it reaches the first instance of the following line:
Code:
Selection.Insert Shift:=xlToRight
At which point, Excel hangs (or maybe in some sort of loop) and I have to open Device Manager and close the Excel exe process.
View 5 Replies
View Related
Jul 30, 2014
From an Excel 2003 workbook I generate some product labels. Each label has a 5 digit job number and a quantity that are passed to variables. If the quantity is 1, then I have no problems in printing my label. My problem is where the quantity is greater than 1. If a job has more than 1 item (can be up to 40 or 50) I need to add a series of letter (or letters) to the end of the job number.
For example:
Job number 12345
qty 1
number on label 12345
Job number 12346
qty 4
numbers on labels 12346A, 12346B, 12346C, 1234D
so that each printed label has a unique job number
View 3 Replies
View Related
Aug 13, 2007
I have the following code to search for serial numbers.
Private Sub CommandButton1_Click()
Dim Message, Title, Default, SearchString
Message = "Enter Serial Number" ' Set prompt.
Title = "Find Serial Number" ' Set title.
Default = "" ' Set default.
' Display message, title, and default value.
SearchString = InputBox(Message, Title, Default)
'SearchString = "Rob"
Set S = Sheets.Application
For Each S In Application.Sheets
With S.Range("A1:IV65536")
Set f = .Find(SearchString, MatchCase:=True, LookAt:=xlWhole, LookIn:=xlValues)
If Not f Is Nothing Then
f.Offset(, 3) = Date
Exit For
End If
End With
Next S
End Sub
I would like to amend this so that (a) if the serial number is not found I get a message box saying "Serial number not found" and (b) if the serial number is found, I would like it to highlight the relevant row (after inserting the date).
View 9 Replies
View Related
Mar 17, 2009
I have a few hundred cells that I would like to combine. Each cell contains a six digit code number. I would like to combine the cells with a semicolon and a space between each code number.
I can do this with the CONCATENATE function but it will take too long.
View 9 Replies
View Related
Mar 4, 2008
I'm having trouble getting my random number generator functions to use my variables that are defined by text box inputs. I can mouse over the variables in the code and they have the correct values, with the excpetion of where they are listed in the functions. I'm sure I'm missing something simple, thanks in advance for any help!
Private Sub cmdPopulate_Click()
StdDev = txtStdDev.Value
RandomNum = txtRandomNum.Value
Mean = txtMean.Value
lambda = txtLambda.Value
OriginCell = txtOriginCell.Value
If cmbDistributions.Value = "Normal" Then .................
View 9 Replies
View Related