Subtotal Each Group Based On Changes In 1st Column
Oct 28, 2009Need to insert 2 blank rows and sum columns (Columns B & D; range varies) based on cell value change (Column A). In attachedment I have before and after examples.
View 6 RepliesNeed to insert 2 blank rows and sum columns (Columns B & D; range varies) based on cell value change (Column A). In attachedment I have before and after examples.
View 6 RepliesI have an excel workbook which contains two sheets. Sheet 1 contains a list of items. I need to search for each of these items in sheet 2 and sum up the 'base price' and enter into column B of sheet 1. So basically
1. I need to pick up the first item in sheet 1.
2. Find the column which contains "Module Name" in sheet 2.
3. Search for the item picked up from sheet 1 in the column which contains "Module Name" in sheet 2.
4. Sum up the "Base Price" for all occurrences and enter this summed value into column B of sheet 1 next to each item.
I'm running the subtotal function, but for some reason Excel is including first row of next group in one of the groups. The label I am subtotalling on is the result of a formula, but why would that make a difference?
See row 11 and 12 in the attachment : subtotal problem.xlsm‎
I have a problem Im wanting to subtotal a range of filtered totals based on column A. Basically skip any filtered total where column A is blank
Column A Column B
735512172626
So when using subtotal 109 it will skip 5 as there is no figure in column A
I am currently using the below code to create the subtotal.
LR& = Sheets("Sheet1").Range("H" & Rows.Count).End(xlUp).Row
With Range("H" & LR& + 2 & "," & "I" & LR& + 2 & "").Offset(3, 0)
.FormulaR1C1 = "=SUBTOTAL(109, R[-" & LR& & "]C:R[-1]C)"
I need to display a subtotal amount in a field named Invoice Total in my spreadsheet. I created a subtotal, which is the amount that I need on each line in the invoice total column. Here is an example:
Invoice Number, Invoice Total, Line_Item_Total
99223, 0, 8.77
99223, 0, 8.77
99223, 0, 17.55
99223, 0, 8.77
subtotal: 43.86
99527, 0, 8.77
subtotal: 8.77
Is it possible to remove duplicates from each separate subtotal group, I have the same value through the spread sheet, but only want it to appear once in each subtotal group.
View 1 Replies View Related(I've actually gotten what I needed through some very convoluted formulas, but I thought there MUST be an easier way!!)
I have three columns of data:
foldername1TEST0001TEST0006
foldername1TEST0007TEST0008
foldername1TEST0009TEST0018
foldername1TEST0019TEST0021
foldername1TEST0022TEST0022
foldername1TEST0023TEST0028
another folderTEST0029TEST0031
another folderTEST0032TEST0039
another folderTEST0040TEST0056
yetanotherTEST0057TEST0058
yetanotherTEST0059TEST0101
yetanotherTEST0102TEST0104
yetanotherTEST0105TEST0106
yetanotherTEST0107TEST0154
yetanotherTEST0155TEST0190
foldername1TEST0191TEST0197
foldername1TEST0198TEST0267
foldername1TEST0268TEST0275
I am trying to get a "range" for each folder using the first instance in columnB and the last instance in columnC. For example, what I need to end up with is:
foldername1TEST0001TEST0028
another folderTEST0029TEST0056
yetanotherTEST0057TEST0190
foldername1TEST0191TEST0275
Again, I was able to finally accomplish this, but it took some way outside the box steps. Tried it in Access with simple query for Min and Max, but the caveat is that there are identical folder names for different ranges (see "foldername1) that need to be captured and I was getting results like "foldername1 TEST0001 TEST0275", which is incorrect.
Using Excel 2013.
Is it possible to get a unique count in a group subtotal though the elements in the group may not be unique using Pivot Tables w/o resorting to Power Pivot?
Ex
Group 123
Group 456
Are both members of NorthDivision
If someone is in Group 123 for 9 months, then Group 456 for 3 months, that membership should be reflected in the correct group accordingly.However, that person should only be counted once in the NorthDivision, not twice.
Output:
Group 123 0.75
Group 456 0.25
NorthDivision 1
At first glance, it appears easy, however, what if membership is only total 3 months?Then Group would increment 0.25, but I need NorthDivision to increment 1
Is there any way to outline excel data automatically
In the attached excel sheet : test outline.xls
I need automatically Because my data very large ...
Import Financial System -Recaps Trial BalanceFrom Date:31-Jul-2011,To Date:27-Aug-2011,
Requested By:Jenny Drumm,30-Aug-2011 9:28 AMAge Range: 0 - 30, No. of recaps: 231
Broker File NumberAgeVendor/Co/DeptFirstBankAssistsFRTBRODTYLoadsInvInvClaimsGL AcctTRUETRUEBalanceCostFeeRecptsAdjRecptsROE VarLC Var
[Code] ........
There are more age groups, & some groups have hundreds of lines. Each of the total line in the report has a number plugged in by the system, which, because of rounding, may be off by several cents. I figured out how to move the rows with Broker File Numer, etc & the row after it up above the first Age Range.
What I need to do next is:Delete all rows between "Age Range: ....." and the start of that range's data.Delete all blank rows between "Totals" and the next "Age Range: ...."Delete 5 rows after "Grand Total"Put a formula in the row immediately above each age range's "Totals" for each column, summing all the data for that column, in that age range. (Hopefully with the word Total in column B of that row, too)Put a formula in the row immediately above the "Totals" after "Grand Total" that adds together each of the Age Range totals.(I did figure out how to get the "Balance" cell in each row to sum that row going right to left, so at least I got a start! For that I'm using
Code:
LR = Range("C" & Rows.count).End(xlUp).Row
With Range("R10:R" & LR)
.NumberFormat = "#,##0.00_);[Red](#,##0.00)"
.HorizontalAlignment = xlRight
.VerticalAlignment = xlTop
.FormulaR1C1 = "=IF(ISNUMBER(RC3), Sum(RC5:RC17), " & Chr(34) & Chr(34) & ")"
End With
I'm trying to figure out if there is a formula I could use that will calculate the average of a group cells in one column based on the condition of another column. It's hard to explain, so I will show an example. All the data is on a one worksheet and I'm trying to show totals and averages on another worksheet. Location, Days
17, 4
17, 3
17, 5
26, 4
26, 8
26, 10
26, 7
On a different worksheet I would want to know what the average days are for each location. So is there a formula that I could use that will look at column A for a specified location number and then average all the days in column B for that location? I'm using Excel 2003 and have tried using the Average(if) but with no success.
I’m trying to get my sheet so that at each change in month it creates a sum of the value but I want to sum to show up in the subtotal value column.....
View 10 Replies View RelatedI am trying to analyse a set of scores of different doubles tennis tournaments - new tournaments and new players are continuously being added and so need some dynamic way to analyse. I would like to extract sort of a ranking system based on the scores by each player and one way to do so is to analyse the scores by tournament. Basically the same players play in different tournaments and i want to be able to know who performs better than others i.e. get better total scores during a tournament.
The attached gives an example of the data i have as well as the result i would like to achieve. It does not really matter if a formula system or a pivot solution is provided as long as i achieve the result, and can add to it as new data is populated. I have been trying all sort of solutions using pivots, matches, lookups etc but no luck yet.
I have several groups of data in the same sheet. Each group has two blank rows above the first row of data. Each group has column "B" in common (e.g., "Phone" in the example attached). I'd like to add a title/label of "Phone" to the first column in the row immediately preceding the first row of data for that group.
View 1 Replies View RelatedConditional formatting. I want to change the color of a group of cells based on data in another group of cells. Example:
If cells G8 and G9 (which are merged) are between 80% and 94%, then I9,I10,I11 (which are merged) will turn Yellow. Also, under the same scenario, IF G8 and G9 is greater than 94%, then cells I9, I10, I11 will turn Red.
I have a list of numbers that I wish to subtotal. I have tried the Subtotal function within Excel, but that is not giving me the format that I need. I have 4 columns. The Column A consists of account numbers.
I want to subtotal the debits and credits in Columns B & C, respectively, grouping them by the account number and then the date in Column D.
For example, after the solution, there would be a single line for each account number with the total of debits and credits per date (if there were debits and credits on multiple days, there would be totals for each day's transactions).
I am attaching an example to help visualize my situation.
I need a formula that will take this information and automatically insert a row, a total, and then another row every time the Product (Column C) or the Account Number (column B) changes. The totals should be under Columns D and E only. But I don't want it to duplicate the results when both the product and the Account number change.
Beginning data: ...
I have a sheet with about 3000 lines that looks something like this:
A...............B..................C
1234........$42.................Subtotal of all values in group "1234"
1839........$58.................Subtotal of all values in group "1839"
1837........$15.................etc
1234........$11.................etc
1592........$19.................etc
The numbers in column A refer to a specific "group" number - anything in this group I want to subtotal into column C.
I'm not sure how to do this though. I've looked at the =SUBTOTAL function, but I'm not sure exactly what to do to make what I'm trying to do work.
I wrote a For Each loop to go through each cell and add values, but that took like 4 hours to run - so.. that's not the way to go lol.
This question is probably simple for some of you but I can't seem to figure it out. All I am doing is grouping data by company name in column A and taking the value of orders in column P and subtotaling them. What I would like to do is offset the subtotal to be in column Q instead of totaling in column P. This is my code for the subtotal:
Sub CustomerWarrantySubtotals()
Dim EOF As Integer
Sheets("Customer Warranty").Activate
EOF = Columns("A:A"). find(what:="", lookat:=xlWhole).Row - 1
Range("A1:P" & EOF).Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(16), _
Replace:=False, PageBreaks:=False, summaryBelowData:=True
'Is there anything in here that will let me change what column to put the total in?
End Sub
way to do this but i have a sheet that is into 5 - 6 thous rows, in one of the columns (names) i sort it by names and then order it by subtotal for certain values.
What i need to know, is there anyway i can take just the subtotal values out and put onto another spreadsheet without copying and pasting it all as there are lots of subtotals and this would help alot as the other info is not nec. just the subtotal'd info. either that or is there anyway i can highlight the subtotal'd row info in yellow/bold text anything like that that would make it stand out without having to do it manually?
I am looking to subtotal specific cells. Basically it is a download from a data base and I have designed an input area for other users to input their predicted figures. But I am trying to put an automatic subtotal for each area depending on the spaces at the start of the cell. I have got a very longwinded formula to get the right subtotals in other files by categorising each line in another file. But I am looking for a vba code to put a simple sum() or sumif() in the relevant areas. I have included some of the categorisation I have had to use for my other formulas.
View 3 Replies View RelatedI've a worksheet that is 3750 rows of cells from A to DT and contains only numbers with the exception of a header row. The rows are in groups, primarily 4 rows, although there are exceptions - these rows are separated by blank rows. Small example as follows.
0:001:002:003:004:005:006:007:008:009:000000-296567-6-1-400000286567-300-230000715557-16-11-40-18141755226-348405-362203081417192125-893581061800-2443-11124-289326-81318-1105027854331331211318-10216-161235526785691450451115951-17-1882505656683093102671056-191-33-2710000554740971-61-78-34224107-169-128-17090179-85220-55-63-1-162-140-242-235328266319106113-214-64-148205-4108120-142076-167-60-68-6418081102-800000000000-3099695807185-80356138-123194186210677727125-23233092-2942944748055564476-422051-224-34461486649597117-84209-22-251-94
I have been trying to conditionally format each group of rows and each column and color the cell in each column of four (or less) numbers in each group that represents the maximum number.
It was easy enough to come up with the conditional formatting BUT it will take forever to do this manually. I've been told to use a macro but I know nothing of programming. Has anyone seen or heard of a macro that might already be written to perform this onerous task.
I need advice regarding the best way to subtotal data that has been exported from SQL Reporting Services to Excel. Formulas are not exported with the worksheet and need to be re-entered. The data is contained in three levels, but second level is not always present (see attached). The Level 1 data has a "pale blue" background and desciptions start in column A. Level 2 data has a "Gray-25%" background and starts in Column B. Detail level data has no fill color and descriptions for it start in Column C. The detailed data should be subtotaled in the Level 2 line directly above it (if available). The Level 2 data should be subtotaled in the Level 1 row directly above it. If no Level 2 row exists beneath a Level 1 row then all of the detail rows below should be subtotaled in the Level 1 row.
I have looked at options for keying on the color or the column contents for triggering when to calculate the subtotals, but nothing that I have tried works. The attached sample file illustrates how the data looks after being exported from Excel. The number of detail rows may change at any time as new projects are added.
I'm looking for a SUBTOTAl IF function (if there's any) that would sum all the distinct values in a column for a given criteria based on another column. My data is listed below:
Column A Column B
(Quarter) (Revenue)
Q1 2008 $10
Q1 2008 $10
Q1 2008 $20
Q2 2008 $15
Q3 2008 $25
Q3 2008 $25
I'm looking for a formula to sum the DISTINCT Revenue values for Q1 2008, Q2 2008, and Q3 2008 based on the autofiltered list. The formula result should change dynamically based on the autofilter selection.
I've reached a point in this macro where I'm stuck with NO clue how to achieve this, or even whether it can be done. In the Before sheet below, I need to bold the cells in H & I if the word "Total" is in G. I could probably manage that part, but here's the weird part: I need to add a formula to H & I of each row with "Total" in G to sum the numbers above it, from the previous total down to the current total. But there's no telling how long each range might be on a given report; from 1 row up to 8 rows.
THEN, in the second row below the end of columns H & I, I need to put a formula totalling all of the preceding Totals
I wonder if there might be a way to tell it to put a formula in H by each cell that has "Total" in G, with the formula summing or subtotalling everything from the cell in H that has data in F to the cell just above the "Total".
Attached File : Acct Activity.xlsx‎
I have a column A1 that consists of a range of values separated by a comma.
row 1:value 1, value 2, value 3, value 4
row2: value1, value 4
Row 3: value 2, value3
I want to get the unique counts for each value in the filtered list. This one field is not filtered but the others in the table are so I only want the counts of value 1-4 when the entire list is filtered.
I have been able to accomplish this with individual values using the following formula:
=SUMPRODUCT(SUBTOTAL(3,OFFSET('1. Respondents'!$C$7:$C$39312,ROW
('1. Respondents'!$C$7:$C$39312)-MIN(ROW('1. Respondents'!$C$7:$C$39312)),,1)),
--('1. Respondents'!$C$7:$C$39312=C4))
This works great other than the fact that I need to count total values of the column in an array.
I would like to get the number of countries that a given "Name" has Partners in. (See example sheet for an illustration)
I have the ID of a group in column A. Column B represents Names. Column C gives Info about the country of "Name".
In column D I would like to get the information how many unique countries a "Name"'s group members are from. This means, not only within a single group, but in total over all groups. This means, that every same Name has the same number of countries in column D.
Formula in words:
"Sum of all unique countries in column C, if ID in column A matches any ID of Name in column B".
I have excel file in the below format.
Sheet1 ABC1NamegroupGroup22A A13AA 4A B25BB 6CC2 7AC4 8D 9E D1 Excel tables to the web >> Excel Jeanie HTML 4
I want count data Based on Group.
The answer is below.
Sheet1 ABCDEF11NameaBCDBlanks12A211 13B 1 14C 1 15D 116E 1 Excel tables to the web >> Excel Jeanie HTML 4
I am looking for a formula in D7
In col E I have a range of numbers
In Col AA I have yes or no
I would like to add all of the col E amounts from line 18-72 where the answer in AA of the same line is no or blank
E AA
18 2.00 Yes
19 3.00 Yes
20 5.00 No
21 7.00
D7 = 12.00
I have a spreadsheet with a content in cells. Some of the cells are indented left and some aren't. I would like a macro that groups all of the cells that are indented left above the cells that are not indented.
I've attached a spreadsheet : Book1.xlsx‎