Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Excel 2003 multiplying out single line items
Name: IsaacCGU Date: June 29, 2009 at 21:12:43 Pacific OS: Windows XP Subcategory: Microsoft Office
Comment:
I'm running an incentive that will have a raffle drawn at the end of the incentive, however the data I receive each week comes with the persons name and how many policies they have sold for week 1, week 2 etc. e.g. Aaron in column A and 10 in column B, 7 in column C and so on. What I want is to have Aaron written 17 times in this example and then continue to do the same for the other salespeople. BTW there could be over 2000 salespeople each one doing up to several hundred sales each over the 4 week period. I will then have a random selection process.
Name: DerbyDad03 Date: June 30, 2009 at 09:18:36 Pacific
Reply:
Try this, assuming your list of reps start in Sheet1!A1, you want the expanded list of names to start in Sheet2!A1 and you won't have more than 16,777,216 total sales.
Sub SaleForce()
'Initialze first cell variable
furstCell = 1
'Determine how many sales reps there are
numReps = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
'Loop through reps
For repRow = 1 To numReps
'Sum Sales for rep
repSales = Application.WorksheetFunction.Sum(Range("B" & repRow & ":E" & repRow))
'Loop through next set of cells based on number of sales
For nxtCell = furstCell To furstCell + repSales - 1
'Place rep name in next cell
Sheets(2).Cells(nxtCell) = Range("A" & repRow)
Next
'Set first cell for next rep
furstCell = furstCell + repSales
Next
End Sub
Summary: when i start excel 2003 it pop up a message "cannot find C:\program files\office 2003.....\analysis\funcres.xla" . earlier i had removed the funcres.xla from this location. please help ...
Summary: I used to prepare monthly progress report where i have to delete the figures under monthly column whenever there is no expenditure during the month also i have to enter figures whenever there is expen...
Summary: Hi! Excel Gurus, let say A1=2 and B1=5 then i add B1 with A1 in B1 which is = 7 i.e. B=7 (i entered this formula in B1 cell: =sum(5+A1) Now the question is: How i can keep updating the B1 cell figure ...