Repeating Sum Of Several Columns
Jan 31, 2007
I have several columns of data representing a shop operation along different years. Now I try to see how will it look like if I have 10 shops like this, all summed up. The problem is that each shop will have the same numbers as the other 9, just that it's first year of operation will be different.
Now, I don't want to have different sheet for each and every shop since their data is exactly the same. I only want to have 1 type of shop which I can add to a consolidated sheet but 10 times, and each time the first year shoud be different.
Just an example: If I have this data for my shop:
YR1 YR2 YR3 YR4
Sales: 10 12 14 16
Costs: 5 6 7 8
Operation: 2 2 3 3
Tax: 1 1 1 1
profit: 2 3 3 4
And lets say I have 4 shops opening in 2000,2001 and 2 in 2002 than my consolidated should look like this:
2000 2001 2002 2003
Sales: 10 12+10 14+12+10*2 16+14+12*2
Costs: 5 6+5 7+6+5*2 8+7+6*2
Operation: 2 2+2 3+2+2*2 3+3+2*2
Tax: 1 1+1 1+1+1*2 1+1+1*2
profit: 2 3+2 3+3+2*2 4+3+3*2
But again, I don't want to open a different table for each shop and than sum them up - I want to have only my one shop, and have a possibility to say when will I open my next shop and the consolidation will be automatically.
View 11 Replies
ADVERTISEMENT
May 22, 2014
I have 1 column of pasted values that basically look like this
c
1:a
2:b
3:c
1:d
2:e
3:f etc...
And they need to look like this:
c1 c2 c3
a b c
d e f
I know how to separate the first column into two columns by separating the values by the colon. But how do I rearrange the values as above and combine all "1"s in c1 so it becomes the headers and the column is populated only with the values? The table is too big to do manually (thousands of rows).
View 1 Replies
View Related
Nov 22, 2013
CartonNo1
ProductNo1
LotNo1
LotNo2
CartonNo2
ProductNo1
LotNo3
LotNo4
In the above (repeating for say, 50 or more cartons), is there a way with a macro(I know nothing about) or pivot table(see macro) to get the following format/result?
CartonNo1
ProductNo1
LotNo1
CartonNo1
ProductNo1
LotNo2
[code].....
View 6 Replies
View Related
Jun 13, 2008
I am trying to do something that is probably impossible, but I figured if anyone could come up with a solution, it would be you folks here at Mr. Excel, so here goes.
I'm trying to set up two columns in Excel 2000; for simplicity sake, let’s just call them Column A and Column B. Each row in Column A will contain a code (a combination of letters and numbers) that represents one of 65 different workstations, and they could repeat multiple times. Each row in Column B will contain a number that represents a specific tool, and there are potentially hundreds of different tool numbers.
What I am trying to accomplish is to have something alert me when any tool number in column B appears alongside more than one workstation code in column A. It would really be nice if something like conditional formatting could be used to change the text to red or something when this happened. I know I can use filtering to accomplish this, but with hundreds of different tool codes, filtering just takes too long.
View 9 Replies
View Related
Apr 20, 2006
sorting data I use in a workbook for athletics. I've really chopped down my workbook for upload, In the worksheet "Leaderboard" I can call up stats for different lifts, and it finds (in this case) the top 5 lifts and the names for the kids that have those corresponding lifts.
My problem is that when two or more kids have the same lift, it will only call up the name of the first instance of that lift. You can see this in the "Leaderboard" worksheet, and the name "Adams, Andrew" appears for both lifts of 75. I would appreciate any help on how to correct this, as I've searched the Internet for weeks now looking for a solution. I've tried experimenting with different things as well, all to no avail.
View 9 Replies
View Related
Nov 18, 2013
Is it possible to automatically have columns repeat through all sheets in a workbook? I keep an annual book, broken down by sheets for each month. I always have to add 5 columns to each sheet, and was wondering if there was an easier way..?
View 3 Replies
View Related
Jun 28, 2013
taking a spreadsheet that has vertical repeating info in Column A and results in Column B and converting that to another sheet in a horizontal list. The main problem is that the repeating info in Column A may or may not always be the same for every customer; therefore, when it is placed in a horizontal format some cells may or may not have results. I tried a arbitrary lookup. Here is the formula I used:
{=INDEX(INFO!$A$1:$B$300, SMALL(IF($A$1=INFO!$A$1:$A$300, ROW(INFO!$A$1:$A$300)-MIN(ROW(INFO!$A$1:$A$300))+1, ""), ROW(B1)),COLUMN(B1))}
That got me started. I am willing to use a macro. Here is some sample data:
Table 1 has a sample of the info:
IDENTIFIER
CUSTOMER INFO
2000
111111
[Code].....
View 8 Replies
View Related
Apr 18, 2012
I had a matrix like this
0 4 0 0
1 0 0 0
0 0 0 2
2 3 0 0
then I used vba to put number between 1 to 4 (since this is an 4x4 matrix) when there is a 0 in the matrix, but the numbers in row need to be no repeat??
so i need something like this for my output. Is there any code for search the number in the row?? How can I do this??
1 4 2 3
1 2 3 4
1 3 4 2
2 3 4 1
View 9 Replies
View Related
Feb 14, 2010
my document column "M" ,this type of numbers are there.
column "M"
125468A-B
125468A-B
458962
256897
412589A-C
412589A-C
412589A-C
01.i need to remove A-B,A-C part.
02.after that any number are repeating that all the number's end part should add (A,B,C,,,,)it's like this.....
[b]
column "M"
125468A
125468B
458962
256897
412589A
412589B
412589C
View 13 Replies
View Related
Jan 5, 2013
Okay, so this is what I am using:
[Code] .......
It is finding the name for a value from a table of values, the only problem is that there are more than one names which correspond to the same value. It doesnt matter to me which name it retrieves, but it lists the same name over and over again, where i'd prefer if it used a different name each time. Any way to keep it from using the same one?
Example1 (pcb).xls‎
View 12 Replies
View Related
Jun 10, 2009
What i need is that result of these counting is 2. Count all without repeating.
I need to find out how many different days are in these fields.
1.6.2009
1.6.2009
1.6.2009
1.6.2009
1.6.2009
1.6.2009
1.6.2009
1.6.2009
2.6.2009..........
View 3 Replies
View Related
Jun 19, 2009
it repeats by increasing range from RZ1 to RZ2, RZ3 till RZ50. For each of the range below calculation needs to be performed.
View 6 Replies
View Related
Apr 3, 2007
VBA code. My sales data is arranged as months in columns and customers in rows. I have about 36 months of data that must be formatted as a single date column for pivot table manipulation.
View 9 Replies
View Related
Jun 23, 2008
I am creating several worksheet where the first two rows are repeated so that I can see those two rows as I proceed down the sheet. That feature works on some but not all sheets. What am I missing? I even tried copying the pages that are correct to another worksheet and that format doesn't copy to the next worksheet.
View 9 Replies
View Related
Jul 7, 2008
I have the below macro that I need to have it repeat until the end of the data, I'm not brilliant with how macro's actually work,
Range("A2:Q5").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
View 9 Replies
View Related
Aug 19, 2008
Suppose I have a following set of data in Sheet1...
FT 1
DD 2
MC 1
AD 1
EE 3
FL 2
GC 1
Under the first column, I have a series of text and under the second column, I have numbers, 1 - 4.
and I want the ouput from the data to be like
FT
DD
DD
MC
AD
EE
EE
EE
FL
FL
GC
in Sheet2, and the process will continue until there is a blank cell under the first column. Can someone help me with this? I have a very little experience in VBA.
View 9 Replies
View Related
May 8, 2007
How can I have a sub repeat itself? I have a code and I want it to ask the user at the end if they would like to do it again. If so the whole sub needs to be repeated. I'm sure this has something to do with looping, but I don't know how to manage this.
View 3 Replies
View Related
Mar 19, 2014
I have a list of colours from A1 to A10. This list may change, get longer or get shorter. In B1 I would like this list to repeat over and over again. but changes. I have attached the list in question, and what I would like it to do.
So to clarify - add a colour to Column A, it will add to the repeated list in Column B.
LISTA.xlsx
View 5 Replies
View Related
Oct 29, 2009
I have a spreadsheet in which data is dumped from a database, there is a dump (on a new tab) for each site.
I need a summary sheet which will add up the two tabs. My problem is however is that I can not use Vlookup as the same codes are used and it will only return the first occurrence.
e.g.
444588 Prime Wages/salaries
This code appears under Production prime labour and Distribution Labour but will only ever return the production prime labour value
Another example would be
444586 Ohd Wages & salaries
This code appears under Production Overhead, Site Overhead, Sales overhead and Admin Overhead this would only ever return the production overhead value only
Is there any way that I can get the summary sheet to use a formula where it looks up the department and then the code? I was thinking index and match but I was unsure if this was possible also.
Worth noting is that the summary sheet has a list of all codes that could be used but the dumps will only ever have values if a cost has been occurred, there for the number of rows in each department is not consistent. There will be a number of tabs however in the attached example I have only provided two.
View 14 Replies
View Related
Mar 4, 2014
Got a huge dataset with a list of non-repeating names. For example, among the dataset is about 1,500 names that dont repeat itself in a column. How can I isolate just that list of non-repeating names from that huge dataset?
View 4 Replies
View Related
Jan 9, 2009
repeating the code on the same worksheet.
i am trying to input this code to my worksheet
View 3 Replies
View Related
Jan 2, 2010
I have some code that copies and pastes data from one cell into a range. The one cell is B4, and the range is A6:A10. This same action must be done every 30 lines (so the next time the cell is B34 and the range is A36:A40).
What do I need to do to make this action repeat/loop every 30 lines?
View 3 Replies
View Related
Dec 27, 2008
I have a list of energy consumption records by address. The utility that supplied the data had to manually pull each record one by one from their 'database'. If two individuals shared one account, the record is repeated.
So, I have a 500,000 row table with some records with identical addresses and identical consumption amounts. How would I go about separating the duplicates (to then delete them)?
It's sorted by address then consumption. The logic is...
if the address value in column A repeats and the consumption field in column B also repeats, then...(place a marker in column C so I can sort and delete)
View 2 Replies
View Related
Mar 18, 2012
I'd like to this number 48,267,135.91 to read as follows:
48,000,000
I tried combine both the substitute abd the Mid functions didn't work?
View 7 Replies
View Related
Jul 9, 2012
I have completed the first section of my spreadsheet.
Section 1 has a number of mandatory fields. Once these are complete and the user changes a combo box then Section 2 opens
I now want to repeat the same again for section 2. Making fields mandatory before a user can change a combo box to yes, which then opens Section 3
From looking around the forum / google I think I can only have one worksheet_change per sheet. If this is the case, how do I now start my next section (to basically repeat Section1 again)
The code I have is:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("E20"), Target) Is Nothing Then
'Section 1
Range("A22:A130").EntireRow.Hidden = True
[Code] ........
View 3 Replies
View Related
Dec 19, 2013
I have a file that I converted to excel and am trying to now convert from rows to columns. So far I have set up the code to do it 3 times but need it to repeat every 12 rows. Here is what I have so far:
Sub rowtocolumn()
'
' rowtocolumn Macro
[Code]....
Not sure what to do to make it repeat?
View 3 Replies
View Related
Jul 15, 2014
I'm trying to repeat a pattern which outputs 4 equal numbers and then increments that number by 1 for another four row as follows
1
1
1
1
2
2
2
2
and so on
how to do this?
View 9 Replies
View Related
Jan 2, 2007
I have a macro which is shown below.
Range("E1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A3").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("I1").Select
Application.CutCopyMode = False
Selection.Copy
What im trying to do is to be able to run the same macro but start on the last cell that I had selected and work on down the sheet until the end. What im also trying to do is to be able to post into next avail line on sheet 1 so it dosent overwrite.
View 9 Replies
View Related
Nov 23, 2007
I have a macro that is working fine. It calculates some values based on a SQL database and then copy the values and paste them into another spreadsheet.
However, I need to repeat the same procedure 1296 times.
Please see below the macro.
Sheets("QUERIES").Select
Range("C1").Select
ActiveCell.FormulaR1C1 = "2"
Range("C5").Select
Selection.QueryTable.REFRESH BackgroundQuery:=False
Range("D5").Select
Selection.QueryTable.REFRESH BackgroundQuery:=False
Range("C5:G5").Select
Selection.Copy
Sheets("AWB RANGE").Select
Range("K2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
I need to increment the line #3 (ActiveCell.FormulaR1C1 = "2") that should start with 2 and end with 1296.
Also, I need to increment the line #11 (Range("K2").Select) that should start with K2 until K1296.
The other parts of the macro will not change.
Would you be able please to give me a hand on this explaining how to create a counter to start on 2 and stop with 1296 ?
View 9 Replies
View Related
Jun 27, 2009
I'm having trouble delivering a MAX value within a range.
In column A I have a running list of numbers, in column B I have a yes or no answer and in column C I'm trying to write a formula that will deliver a MAX value from the A column inbetween occurancies of the Yes and No values from the B column.
I'm trying the SUMIF function but it seems to be proving problematic.
This is what it would look like.
A B C
1 Y 1
2 Y 2
3 Y 3
2 Y 3
1 Y 3
2 N 2
7 N 7
6 N 7
5 N 7
3 N 7
2 N 7
6 Y 6
9 Y 9
3 Y 9
It is almost as if I'm trying to get the formula in the C column only find the latest MAX value from where it currently is to when the last changeover happened from Y to N.
I can't find the Max dependent on a yes or no answer, but I'm struggling to make it only look at the last batch of Yes's or No's!
View 9 Replies
View Related