I would like some help with a macro code. I need to create a number say in cell I24 on sheet 1. this number is a sum of a random iteration and so will be differnet each time.
i want to run 5000 iterations through and record the 5000 different numbers that appear in this cell into a list - say going from D10-D5009 in sheet 2 of the workbook... - then i will perform the relevant statistical analysis on the data...
so essentially i would like the macro to hit the F9 key 5000 times and then record those 5000 results for me on sheet 2...
I work with contracts and have to report the sales for each contract by customer number, name, address, product code or sku, sales amount, quantity, and invoice date. Each contract number is associated with a product group and within that product group are a laundry list of product codes or skus.
Customers are often on different contracts for different products and may purchase some or all of the products on that contract. When I run a query from the system to extract this data, I get one sheet that contains 20,000 lines that have to then be sorted and seperated into different tabs based on the contract number. Keep in mind that a customer may be listed multiple times because each line in the query represents a product code and an invoice date.
I currently have a macro that will format the reporting such that it sorts the data, however, what it doesnt do is look for each instance of a particular contract number and separate it into different tabs.
So below are two examples: April and May 2008 Reports
April 2008 Report Contract 1 contains 5,000 lines of data - extract into new tab Contract 2 contains 5,000 lines of data - extract into new tab Contract 3 contains 5,000 lines of data - extract into new tab Contract 4 contains 5,000 lines of data - extract into new tab Total lines = 20,000
May 2008 Report Contract 1 contains 7,500 lines of data - extract into new tab Contract 2 contains 5,500 lines of data - extract into new tab Contract 3 contains 8,000 lines of data - extract into new tab Contract 4 contains 9,000 lines of data - extract into new tab Total lines = 30,000
So for the April Example, I would like excel to take this one list and break into 4 new tabs based on the contract number and carry over all of the data into that tab.
Where this may become difficult is that there may be more lines of data one month and fewer another. Im not sure if there is a function that will tell excel to stop when it reaches the last line for one contract number and to start a new tab for the next contract number. (see the month of May example)
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.
I need to create a macro that can create a dynamic copy/paste loop. So far what I have is horribly inefficient. Each row in colmn A(minus the header) has a unique number in it. For each unique number, I need to paste it based on the number of column headers in row 1(minus column A). So, if there are 20 column headers, I need to copy cell A2 and paste it 19 times in another sheet. Then, I need to move to the next number in column A and do the same thing. Here's what I have:
[Code] .........
You can see that this is not dynamic. If I add another row to my table and rerun the macro, it will not catch it. I've attached a sample file to show you the big picture of what I'm trying to do. The data that I have is in Sheet1, and I'm trying to get it into the format in Sheet3. Rows/columns will be periodically added to the table in Sheet1, so the macro needs to be dynamic to catch that. The data in Sheet3 will always remain, and the macro will add the updated data below the old data in Sheet3.
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?
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:
I want to create a formula that converts data covering three months (i.e. Jan, Feb, Mar) into fiscal quarters (=Q4), how can I do that?
In Column A, I have the project name, in Column B, I have the month (in date format) by which it needs to be completed, and I want Column C to automatically calculate the fiscal quarter for each project using the data in Column B.
I am creating a custom autonumber in excel. The autonumber will be based on the value of another cell's value. So for eg, in cell A1 will look at B1, if B1 has the number 1, A1 will take B1 and add the autonumber to it, eg a, b, c.
If within, b5 the number is 2. So if the number in the corresponding row in b changes, the autonumber must restart.
I've decided to go with a-z for the autonumber as i realized for .1, .2, .3 is limited to 9 values in the list bec. 1.10 may be read as 1.1
I've tried a few options such as creating a named range, however the problem is getting the autonumber to restart.
Below is what i want to achieve via excel formula:
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 Add-Ins (both the Analysis ToolPak and the Analysis ToolPak - VBA, but nothing seems to happen. Is there another way to generate these numbers?
I am working on a spreadsheet and would like to create a cell that allows the user to input a number (1 to 5) which will then equate to a percentage(%). I would then like this to deduct that percentage from a total number...
To try and explain this.. Should the user input 1 into the cell, this would then equate to 3% - this would then deduct from a total that percentage. Input 2 = 5% etc..
What i'm looking to do is create a spreadsheet where the first page allows me to input the number of teams in the group.The teams cannot play others in the group except the ones they are paired with. eg. "Enter number of team pairs in set" (in this case 4)
Team 1a vs Team 1b Team 2a vs Team 2b Team 3a vs Team 3b Team 4a vs Team 4b
After number of teams in set is established click a start button on the first tab of the spreadsheet.
this auto generates a new tab with all the possible win/loss combinations of 4 team pairs.
New Picture.jpg
if the number of teams on Tab 1 is changed (say to 6) and the start button is clicked, another new tab is generated with all possible win loss combinations of a 6 team set.
remember 1a vs 1b can only be win or lose and the win lose combinations are for the set of 4 matches ( or more matches if specified on the first tab and clicked).
if you put 7 in for the number of team pairs then it would be win loss combos for 7 pairs of teams.
I am trying to create a formula to pull the person's name and the avg number of cartons sorted for the month from this spreadsheet.
I've attached a sample of the spreadsheet I created, you will see at the bottom I would like to see the person that had the highest avg for the month and the person with the lowest avg for the month.
This is just a simple spreadsheet to track productivity of my sortation employees.
If only 1 row is selected, it works fine, but if I've selected multiple rows it continues forever. I want to create a row in my ListObject based on the number of selected rows.
Code: Sub CreateRow() Dim rRow As Range
With ActiveSheet.ListObjects(1).ListRows For Each rRow In Selection.Rows .Add (rRow.Row - 2) Next rRow End With End Sub
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 user-form 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.
Writing a Marco. I would like to place a macro on the opening page of a workbook and like to a button that executes three functions.
1) I need to hide selected tabs in a workbook 2) I need to copy paste values of a couple select cells in a workbook 3) Lastly, I would like to set up the workbook so that the use can not move beyond the opening tab with out clicking the macro to preform the steps above.
Is this possible? I know 1 and 2 are for sure, what about 3?
However, I want to use this same function in another place, without the limit set on the cells that will be cleared.
What I would like to do is send the formula the cell to start at (E14), offset that by one column, and then send a number of rows. With that, create the range to be cleared.
I am trying to create a spreadsheet that will automatically increase the work order number by 1. The cell will always be in the same place. The idea is that when the file is opened it populates the number. After being closed and reopened the number will be 1 higher than the previous.
The page will reused by various people to create and print work requests for my mechanics, I want it to assign the W/O automatically.
I’m 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.
For my assignment, I am supposed to create a worksheet that will generate a random social security number (using the correct social security form of 000-00-0000) There are supposed to be a billion social security possibilities and each should be equally likely to be selected in the worksheet.
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:
I have the following data set with about 500 rows. It has one large value in column A, followed by a number between 1 and 24 in column B.
I am trying in Excel 2013 to develop a formula that will: divide A by the value in cell BPlace in cell C, D, E, F... the result of this division, where the number of times the value is repeated depends on the value in B. E.g.
Example of source values/data set: A B
18504 18
2011 2
23694 24
(about 500 rows more)
An example of the output result that I am looking for: A B C D E
2011 2 1,005.5 1,005.5
In above example, the value in column B is 2, so the result of the division of value A with value B is repeated twice. In case value B would be 18, the value would be repeated 18 times...
I have been trying to do this in Excel for more than 2 hours, but I did not manage to complete it.
You must install "Analysis TookPak-VBA" before doing this; check in your Excel's Tools/Add-Ins menu. Paste this long function (see below) in an Excel's worksheet (any cell) and press F9 (calculate) until you see at least 2 identical numbers. Real life's lottery does not have repeating numbers. I can disable this repetition by using cells relation but I want to use just one (1) cell. Any expert wants to challenge? If not, you can use VBA. But it still requires one (1) line of codes.
VBScript code snippet below is being used in an ASP page but the call to GetObject never attaches to a running instance of Excel. Since visible property is set to True, I can see the instances accumulate in the TaskBar each time the ASP page is called, so there are obviously instances to attach to.
Dim excelApp Set excelApp = Server.GetObject(,"Excel.Application") If (err <> 0) Then Set excelApp = Server.CreateObject("Excel.Application") End If excelApp.UserControl = True excelApp.Visible = True excelApp = Nothing
GetObject errors out with the following error: Error - Number:429 Source:Microsoft VBScript runtime error Description:ActiveX component can't create object
I work on a daily basis with spreadsheets in excel. The number of columns is the same, but every single spreadsheet has a different number of rows. I recorded this macro in a table with 1196 rows and I would like to use this macro also in other tables with a different number of rows.