Code To Create Customer Number
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
ADVERTISEMENT
May 3, 2014
I want to create a customer ID for thousands of customers and then be able to find the customer by doing a search for the ID later. I'm even thinking of using a customer phone number for the ID. What function can I use to later find the customer?
View 10 Replies
View Related
Jul 6, 2008
I have an excel file which contains following data in it.
Col-A Col-B Col-C ......
Cust Cd Name Sales
=======================
101 AAA 1000
101 AAA 500
101 AAA 3000
102 BBB 800
102 BBB 200
103 CCC 200
103 CCC 200
103 CCC 200
I need to create following three workbooks with name based on Cust Cd from above excel file.
Workbook - 1 : 101.xls which contains records only pertaining to Cust Cd 101.
Workbook - 2 : 102.xls which contains records only pertaining to Cust Cd 102.
Workbook - 3 : 103.xls which contains records only pertaining to Cust Cd 103.
View 4 Replies
View Related
Oct 8, 2008
Im getting data from query. My data has fields: Item No, Customer ID & Sales rep.
I need to find out for each Item number which customer put order and who was the sales rep. (Excel 2002). see file attached.
View 4 Replies
View Related
Aug 29, 2012
I am trying to create a formula that will determine the number of orders for a specific customer whose orders have a pallet count between a certain range. The customer code is a cell reference, as well as the beginning and ending values I am looking for. I have the data on a separate tab from where I am putting the formula.
Here is what I was trying to use, but it was coming up with "0" for everything:
=COUNTIFS(Data!$I:$I,E7,Data!$I:$I,">=A8",Data!$I:$I,"
View 1 Replies
View Related
Jan 7, 2008
I have a simple list of all purchases made. ie)
Name.......Purchase date
John........01.01.07
Susan......06.08.07
John........07.07.07
John........01.05.07
I'd like to roll up the sames to create one customer row, but so I see the varience between purchase times. ie)
Name.......Ist Pur date....2nd pur date.....3rd pur date....time from pur 1 to 2
John........01.01.07.........01.05.07..........07.07.07........120 days
Susan......06.08.07...................................................(not sure to include this)
Is this possible in excel?
View 9 Replies
View Related
Dec 12, 2009
i have one excel sheet (refer attach) i give some example 7 to 8 customers, but in sheet nos. Of customer name a to z suppose to 3000 customer list. Now i want to create automatic customer alfa- numaric code.
View 2 Replies
View Related
Feb 2, 2012
I currently have a number of data sets relating to customer's and values, eg.
Customer 1 12 12 12 12 12
However within this data set I also have a number of items where different customers have been grouped but are separated with a “/”, eg.
Customer 1 / Customer 2 / Customer 3 12 12 12 12 12
I want to be able to, find these rows, and break them out so that each customer with relating data is on a separate row, eg.
Customer 1 4 4 4 4 4
Customer 2 4 4 4 4 4
Customer 3 4 4 4 4 4
View 7 Replies
View Related
Dec 11, 2012
We've got a bug in our finance system where it can't handle any transactions that have sales but no related commission. The BI team provides a CSV file separately with this information and the sales team has to manually input it. I know how to create a template that can be uploaded into the system but don't know how to pull the data into the template from the CSV file.
I've created the attached example and what i'd like is a drop down box in cell B1 (template tab) listing all the customer codes in column B on the data tab and then based on your selection all the related transaction lines pull into columns A to F (starting on row 4).
Manual Invoicing Query.xlsx
View 1 Replies
View Related
Feb 1, 2007
I have a master worksheet that contains a lot of datas. Example below:
Invoice # Code Customer Money
1 1101 a 10
2 1102 a 20
3 1102 b 30
4 1103 c 40
5 1104 d 50
6 1101 a 60
7 1103 c 70
After creating a pivot table with code, customer as Row and money as Data, I get this:
Sum of money
Code Customer Total
1101 a 70
a Total 70
1102 a 20
a Total 20
b 30
b Total 30
1103 c 110
c Total 110
1104 d 50
d Total 50
Grand Total 150
Suppose now, I have another data named Rate that I need to associate with each pair of Code and Customer. See below:
Sum of money
Code Customer Total Rate..................
View 2 Replies
View Related
Jan 27, 2014
I have a list of customer including customer name and customer number. Is there a way to exact customer number out only? This is the example list.
WAL-MART STORES INC - 1028
KOHL'S - 28983
JOHN'S PET PRODUCTS - 3692
PET SUPERMARKET, INC. - 2298
COSTCO WHOLESALE - INTERNATIONAL - 2783
LOBLAW CO-WESTERN GROCERS - 7424
All I want is the number behind the dash. There are few customers that have more than 2 dashes.
View 8 Replies
View Related
Jun 27, 2006
I am trying to automatically show the date of the last invoice per the customer number.
I have attached an example.
View 9 Replies
View Related
Nov 22, 2006
how to create a barcode in an excel spreadsheet? I am trying to print out a sheet that includes a code 128 barcode of a specific number that I type in.
View 2 Replies
View Related
Feb 18, 2014
I'm looking to count the number of customer accounts in a report based on the branch number. I generally need to know, how many accounts has been opened per each branch without double counting the same account number (as it happens that the report may have duplicate number.
finally I need to know the sub total showing the total per branch and subtotal of all branches together.
View 14 Replies
View Related
Dec 9, 2011
I am trying to do a vlookup to 1 sheet based on customer number and return price. If no customer number than I want to do a vlookup based on dunnage number to return the price. This is what I have for a formula but it never returns a value if one is found in the first lookup.
=IFERROR(VLOOKUP(C4,'Dunnage Exception'!A:C,3,FALSE),IFERROR(VLOOKUP('Raw Data'!D4,'Dunnage Master'!A:C,3,FALSE),"0"))
View 2 Replies
View Related
Aug 1, 2014
I have a list of Spid numbers and a service category identifying if it is a Water Spid or a Waste spid.
The Spid is split into 2 parts. The Core is the identifier and the Category states if it is a Water or a Waste spid.
If the 1st digit in the Category is a 1 = Water.
If the 1st digit in the Category is a 2 = Waste.
There may only be a water spid or a property may have a water and waste spid.
What I want to do is have the information on 1 row rather than 2 rows
I have data in this format
SPID
Core
Category
Service Category
100000000151
100000000
151
1
[code].....
and I need to convert it into this format.
Core spid
Water
Waste
100000020
100000020101
100000020251
I have tried IF(lookup) and it works for the 1st row but I can't get it to look at the 2nd row.My data consists of 400,000 plus rows
View 3 Replies
View Related
Jun 24, 2009
I have this macro below and would like the code changed to find the "Customer Number" column by name rather than by column B. Note that the "Customer Number" column will always be somewhere in row 1.
View 12 Replies
View Related
Jan 9, 2007
I have 1) a list of 10,000 customer records with customer numbers (including duplicates) in field A, and 2) a separate list of 25 customer numbers that are "red" accounts.
I want to add a new ID field to the larger customer list, and using the 25 red IDs, I want to mark any of the 10K records that match the list of 25 with an "x".
I thought about using multiple nested-function formulas and concatenating the results, but then, I always do things the hard way! ...
View 9 Replies
View Related
Jun 22, 2007
In sheet1, (B2 & C2) are the numbers entered by the user. After they entered, it will create rows of table according to the number of groups they entered on the respective sheets.
how do I let it create the groups itself?
View 9 Replies
View Related
Feb 22, 2008
I'm trying to add buttons to an excel spreadsheet at runtime. Each row in the spreadsheet should have its own buttons. I was able to create and edit them with the ActiveSheet. OLEObjects.Add() function, but after that, when i was trying to create code dynamically to react on the buttons' click events excel crashes (actually it works for one button, but not if my routine for adding a new button and event code is called more than once in a row!)
The code below works if the AddCmdbuttonWithCode() is called once, but crashes if it is called two or more times. Excel tries to restore the document after the crash and the first button and its corresponding click event code is visible and works... but NOT the second button and its event code...
The only way I can create multiple buttons right now is by calling my method once per click, opening the vba editor, changing the parameters for my AddCmdbuttonWithCode() routine and execute it again. After that I have mutliple buttons in different lines which all work fine (so the concept seems to work).
The problem seems to be the insertLine method, since everything seems to work if i leave it out (except for the code generation of course, since this is done by this part of the code :-) ). Is it possible that calling the insertLine Method can't be called multiple times? I don't know... any ideas? Feel free to test my code - it's small, easy to understand and has comments.
'this code calls the method which creates the buttons in specific cells with specific names
Private Sub CommandButton3_Click()
'the first call always works!
AddCmdbuttonWithCode "Edit_111_111_114", 23
'the second one crashes excel
AddCmdbuttonWithCode "Edit_111_111_115", 27
End Sub
View 3 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
May 17, 2006
I have a vba module that reads a value from a txt file and saves that value in a variable called "iniInfo". I want to permanently assign that value programatically by using VBA code to create a Public variable e.g. "PUBLIC CONST conFIg = iniInfo" in my modGlobalVar Module. (Of course, this would only create the code if the "conFig" variable doesn't already exist.)
View 2 Replies
View Related
Mar 6, 2014
Create a search engine in vba for a worksheet, a macro to be assigned to a button. The 'search engine' to that 'Find button' that I have in mind is on these parameters:
- search any result, complete or partial, non-case sensitive;
- the text to search is typed in B2;
- after the text to search is typed, it only works by pressing that 'Find button';
- it only searches column D in the current worksheet;
- tells the total number of matches found in C2;
- when that Find button is clicked, it goes automatically to the first result found and stops;
- if that Find button is clicked again then it goes to the next found match and stops, and so on;
- when it reaches the end of the document, it just restarts to search from the beginning;
- if there are no matches, it just makes a sound and does nothing; and types zero (0) in C2.
View 11 Replies
View Related
May 7, 2008
Using a formula,
How can i get excel to create a custom unique number using the first three (or two) characters from another field and then adding four unique numbers to the characters.
basically heres the info
Field H2 contains the characters "ACS" so i would want another field to create a unique code to include something like "ACS1234" and to continue to the next row would be the first three characters of field H3 then 1235.
View 9 Replies
View Related
Jan 5, 2010
I have to do monthly comparisons of two excel worksheets, one being a vessel timesheet and the other being an excel download from manpower software that we use. The comparison that is being made are days of the month, whilst the unique identifier between the two sheets (To make it easier to understand I will call them sheet1 and sheet2) is an employee ID. Both sheets, alongside the name and employee ID, list all the days of the month that employees have worked. If they have worked, there is a "1" under that day, if they have not the cell is blank.
What I currently do manually is:
1: Search for the employee ID (and/or name) in sheet1 and compare the days with the employee ID in sheet2.
2: Highlight the differences
3: Move onto the next employee ID
All differences are highlighted in sheet2. Differences highlighted are in the days only, where if any days are missing/extra in either sheet, then the particular cell(s) are highlighted in yellow. If an employee is missing from sheet1 but is in sheet2, then all the days are highlighted (in sheet2). If an employee is missing from sheet2 but is in sheet1, then that particular employee is copied to the bottom of sheet2 (after last row).
As this is horribly complicated to explain, I can attach an example if this is sounding rather inexplicable? Is it possible to attach a xls to a thread?
View 9 Replies
View Related
Apr 21, 2014
Macro to run every 3 months, copy the workbook its in, save as a new name, and then delete all of the tabs in the workbook except for the "Menu" tab?
However, I get errors with my code below.
[Code] .....
View 7 Replies
View Related
Sep 5, 2013
I don't know VBA code but i am familiar enough to know that a code can be written to separate out information into different tabs on a worksheet.
For example, I have a standard worksheet with say 20 columns going across and 20,000 rows going down. At each "name" change in row 1, I would like a macro to copy into a new tab. Basically the end result will have a tab for each name and the corresponding columns that go with the name.
View 2 Replies
View Related
Dec 12, 2008
I have this code that will create 3 worksheets with the name "New Name" and the # ( 1/2/3 ) ..
How would I change the code if I want 3 worksheets with different name?
Like Sheet1 then Sheet 2 then Sheet3 or any other name?
'To add worksheets and change name with one code
For i = 1 To 3 'Creates 3 worksheets
Set ws = Worksheets.Add
ws.Name = "New Name" & i
Next i
View 9 Replies
View Related
Sep 1, 2006
I have been trying to create a macro that creates a new workbook and prompts the user to enter a new filename for it. I'm getting stuck with the code.
View 3 Replies
View Related