Summing With Multiple Conditions
May 19, 2008
I need to sum the items in column G12:G39 with the 1st name in Column B12:B39 which could be 1 of 9 different names, that, and the 2nd name in column D12:D39 cannot not say either #4 or TE. If it says #4 or TE, then it needs to sum the info in colmn G12:G39, based on the 1st name in column B12:B39.
View 9 Replies
ADVERTISEMENT
Feb 11, 2010
I have been trying to search an array and cannot find the correct combination of functions to get the information I want. I might need a macro to do this but I will try anything. Here is an example:
1 A 1
1 B 2
2 A 3
2 B 4
3 A 5
3 B 6
I want to search for 3 and A and return the value in the 3rd column. I have tried several functions but cant figure out how to make sure I get the correct value in the 2nd column that corresponds to the value in the 1st column.
View 14 Replies
View Related
Mar 27, 2007
I could probably fix by making a loop, but I am trying to avoid doing any more looping. The program that I am working on has way too much looping in it already, and is getting kind of bogged down.
Here is what I need. On my worksheet, column D lists the names of farms, column E lists a specific chicken house on that farm (by number), and column F lists how many chicks are being placed into that house. What I need to do is find a way, within VBA, to add up all of the chicks in column F that correspond to a certain farm name (column D) and chicken house (column E).
I can make something like this work in excel, but not in VBA. For example, if I wanted to find out how many chicks were being delivered to Johnson Farms, house 4, I would use this formula:
= SUM(IF(($D$5:$D$25="JOHNSON FARMS") * ($E$5:$E$25=3),$F$5:$F$25 ))
View 9 Replies
View Related
Oct 1, 2007
I know there have been many posts about multiple conditions in arrays, but I didn't find one that applied to my situation, so I'm hoping can help me out of jam. I'm using Excel 2000 on XP.
I have a database of sales information. Customer name is listed in column C, and columns F through Q contain the sales for the months of July - June (fiscal calendar year), with the headers for the months in row 4. There can be many rows of sales for the same customer, hence the need to sum them.
Example
C F G H
CUSTOMER JULY AUGUST SEPTEMBER
customer1 2 3 4
customer1 2 3 4
customer2 2 3 4
customer2 2 3 4
The problem is that this information will need to be updated every month to reflect sales year-to-date, meaning that the conditions for summing the data will change depending on how far into the year we are. So for instance, in August I will need to sum all the records for customer1 in the July column (column F) and the August column (column G), but next month it will have to sum the records for customer1 from July, August, and September (col H).
The result of this information would be displayed on a different worksheet. My thought was to assign a range of 12 cells (Sheet2!A1:A12) and to populate those cells with any of the months that need to be summed thus far. So for example, through September, A1 = "July", A2 = "August", and A3 = "September". Then the formula would use those values to evaulate the conditions. So in plain English the formula would:
sum the values in columns F : Q where the monthly header = the values in the range Sheet2!A1:A12 for all records where CUSTOMER = CustomerName
View 9 Replies
View Related
Jul 27, 2012
I have a spreadsheet which has data in rows. I need to sum the first 5 values from the left of the range which are greater than zero. BUT if there are less than 5 non zero values present I want to sum from the right of the range.
First condition:
1 2 3 4 5 6 7 8 9 10
The function would return: 1+2+3+4+5 = 15
Second condition:
0 0 0 4 5 6 7 8 9 10
Function would return: 4 + 5 + 6 + 7 + 8 = 30
Third condition:
0 0 0 0 0 0 0 8 9 10
The function would return: 10 + 9 + 8 = 27
I have had success with:
=B4+SUM(SMALL(IF(I4:O4<>0,I4:O4),ROW(1:5)))
(using ctrl shift enter)
BUT it crashes when faced with the third condition.
I would also like to avoid ctrl-shift-enter functions if I can as I don't have much success copying them around the spreadsheet.
View 3 Replies
View Related
Jan 31, 2009
I am looking for help in developing steps in a spreadsheet to calculate a sum based on a few conditions. The basis of my spreadsheet works fine, however I am trying to add the contents of a cell to another by checking other cells.
For example:
Cells A1:A10 contain a numerical sequence (1-10 respectively) to indicate a "Node"
Cells B1:B10 contain a user selected number (1-10) which defines the Node it is fed from. We'll call this "Fed From Node".......ie. If Cell B2=1, that means that Node 2 is fed from Node 1.
Cells C1:C10 contain a value which is input by the user. We'll call this "Amps"
Cells D1:D10 would show the total "Amps" of the current cell added to all others that are fed from same.
What I am ultimately trying to figure out is how to add the "Amps" to each "Node" and show the results in column D.
More specifically if the spreadshet looks like the following: ...
View 9 Replies
View Related
Jun 1, 2009
I want to sum certain data, which meets two conditions.
My data set contains three columns and a lot of rows. The columns are the following:
PostalCodeDeparture
PostalCodeArrival
PassengersInCar
I want to sum the total number of passengers with departure postal code 5100 and arrival postal code 5110. (and I want to do the same for all other postal code combinations in the data set)
With "SUMIF" I can only include one condition.
View 4 Replies
View Related
Jul 7, 2009
I have a cell that I need to make a calculation if certain other cells =Y, or to show "0" if the other cells =N. I can do the calculation for the Y part but how do I add the N part of it? Here is what I have:
=SUMIF(J19:J40,"Y",H19:H40)*0.08
View 13 Replies
View Related
May 14, 2014
I track distribution using 1 workbook for each sales rep. Each workbook has a separate worksheet (scorecard) for each of their locations showing which of our products are used in that location, for various functions. Each of the locations has a segment (bar, nightclub, casual dining, etc.), and a class (AA, A, B, etc.). All of the scorecards are identical, and are in the same file folder on our shared drive.
Sample:
Location A Class:AA Segment: Sports Bar Rep: John Smith
Product: Product X Product Y Product Z
Well: 1 0 0
Back Bar: 0 1 0
Cocktail Menu: 0 1 1
I was unable to find an HTML maker so this is not an actual sample but what I'm looking at. The above data indicates that for location A (Sports Bar, Class AA), Product X is used as the well, Product Y is on their back bar and their cocktail menu, and Product Z is not used at this location at all.
I need to set up an analytic workbook where I can sum data based on multiple and grouped criteria, and for multiple reps ie- display a scorecard that shows totals for nightclubs and sports bars, class AA, A, and B, for a particular rep; OR display a scorecard that shows totals for nightclubs, class A for a group of reps. Ideally I would like to do this using drop down menus that allow the user to select multiple criteria in each of the drop downs, having the data auto-populate based on those selections.
View 2 Replies
View Related
Jan 8, 2014
In the attached spreadsheet I would like to calculate the totals for pipe and valves by service & size (Columns A,B D & D) from the groups of paired columns Pipes & Valves under the headings of SD0-1, SD0-2, SD0-3 etc etc to LP-SD8 multiplied by the number of Service droppers (Highlighted in red) with the totals in columns G & H.
I can individually write a formula such as G7 = (I7*I4)+( K7*K4) etc etc, but is there a way to lookup up the data cells?
View 7 Replies
View Related
Dec 17, 2008
I want to be able to sum across a worksheet the products in individual rows of a $ rate and a qty, without doing this for each column and then adding them.
for example: I might have in B1 '$100' and in B2 '3', then in C1 '$200' and C2 '6' and so on. What formula can I put in A3 to sum B1*B2 plus C1*C2 and so on?
View 2 Replies
View Related
Mar 26, 2013
I am working on a sum formula for a column and I only want to sum if the value is a multiple of 15 or likewise if the value divided by 15 is an integer. I know that I could use several sumif statements to accomplish this, but there isn't really a maximum value. Is there a simpler way to accomplish this? I am comfortable enough with VBA so that is definitely an option as well.
View 4 Replies
View Related
Apr 17, 2009
Using Excel2007 / Vista
Weekly I receive commission payment data. Essentially 2 columns, Col A the client name, Col B the commission amount. I like to sort the data so that I have a total commission amount for each client
Firstly I sort the 2 Cols alphabetically. Where there is only one instance of a client name, the total commission is obvious.
But any client can appear several times (anything up to 6) with corresponding commission amounts for each name occurrence.
One week a client may not appear at all, or they may appear from 1 to 6 times.
I seek a formula which, where there are multiple instances of the same client name. will total all the commission payments for that client. Naturally the formula can be in a new Col.
View 9 Replies
View Related
Oct 8, 2007
I've got no clue about all this, but I've had to get specific formula examples and fill in the blanks in order for my timesheet to work. There's just one final problem if somebody could please help.
This is a timesheet for a 5 day work week. I need to count the number of unique log numbers for a specific activity. The log numbers counted must be unique across the entire week, not just for each day, which means I want the formula to count the unique log numbers across multiple sheets.
The formula also has multiple conditions. I got 2 columns. The first part of the formula needs to verify a word, say, "split" and if it does it checks the adjacent cell for a unique log number. If both arguments are true, it counts the log as 1 unit.
Here is a working formula for only one page.
=COUNT(IF(D4:D29="split",IF(FREQUENCY(C4:C28,C4:C28)>0,1,)))
Here's 2 problems with this formula:
1. I will count if it encounters a blank cell in the Log numbers the first time (which will happen as not every activity we do has a log#), but it will stop counting if it encounters a second blank cell.
2. I don't know how to make it work across several sheets.
This is an alternate formula which works and skips the blank cells, but I don't know how to add the multiple condition of "split" and to have it work across multiple sheets. I just copied it Microsoft. As I said, I don't understand it, I just fill in the blanks.
SUM(IF(FREQUENCY(IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""), IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""))>0,1))
View 11 Replies
View Related
Aug 20, 2013
1. I created a macro to put in multiple sheets when clicking in pivot table fields
2. I didn't want to include 2 main sheets in the process ("PROV_AGENTEN_SEE_EXTERN_2013073") and ("PIVOT 20130731")
3. In each newly created list I want to put in the sum of the last column. This will be calculated in the last cell below the table.
The last point is troubling because it looks at right values but the sums are not right. They are right only in the last sheet in others it isn't calculated correctly.
VB:
Sub Sheetsfrompivot()
Application.DisplayAlerts = False
For Each Sheet In Application.Worksheets [code].....
View 1 Replies
View Related
Jul 7, 2014
I have Mac:2011 version of Excel. Here's what I'm trying to do... I have 5 sheets, 1 for each week of a typical month, and then a 5th sheet in which I want to add cumulative values.
In the first four sheets, column A is the name of a person. Columns B through H are daily performance values. Column I is the weekly sum of columns B-H. I am sorting each of these first 4 sheets by column I, from highest-lowest; so a person's row position changes from sheet 1 through sheet 4, based on how well they did in comparison to other people.
I should also mention that a person may or may not appear in each sheet for weeks 1-4. They might be there in week 1, miss week 2, and be back for week 3 and 4, etc.
Now, in sheet 5, the 'cumulative values sheet', is where I'm having difficulty. Column A is again, where the names of people should go. Columns B, C, D & E are what I want to be the sum values from Weeks 1-4. And finally, Column F is a sum of these columns B-E, yielding a monthly total. Here's the logic of what I want to do...
Part 1:
Look at the name of the person in [Sheet 1:Column A through Sheet 4:Column A]... If a person's name from [Sheet 1:Column A through Sheet 4:Column A] doesn't appear in sheet 5, column A, copy that name to sheet 5, column A. Otherwise, move on to part 2...
Part 2: Look-up the week 1 value of the Sheet 5: Column A name, from sheet 1, and copy the associated sum value of that name (sheet1:column I) to Sheet 5:Column B. Repeat for Sheet/Week 2 value to Sheet 5:Column C... Week 3 to Column D, and Week 4 to Column E...
And finally, sum the values of Sheet 5, Columns B-E to column F. Sort highest-lowest.
No issues with the summing function, but I'm not sure the best way to achieve 'Part 2'. I've been fooling around with VLOOKUP, and have had some success with =VLOOKUP(A2,Week1!A2:I26,9) for column B, =VLOOKUP(A2,Week2!A2:I26,9) for column C, etc... but it's only performing properly for my first row, and then I mostly get #N/A. So what am I missing? Or is there an alternate function that would achieve this in an easier fashion?
View 5 Replies
View Related
Feb 8, 2014
We have a table that records payment dates and amounts ... and it categorizes how the payment was made. See attached file to understand the process.
Column A records the payment date. Two or more payments can be recorded for the same date!!!
Column B records the amount of payment.
Column C records the method of payment (OL or LB or CC or CK).
Here's what we need:
On a given date (cell J4), we need to match any dates in Col A ... and we need to SUM all payments that match that date .... and the SUM needs to be based upon the method of payment (OL or LB ...) and values stored respectively in E4,F4,G4,H4 (or left blank if no date match).
View 4 Replies
View Related
Feb 3, 2009
I'm going nuts trying to figure out what formula I could use to give me totals in columns Q and R of the attached file. Basically, in the Weekly Totals column, I want to populate how many Customers and Bags were handled according to each ship name (the data is in the table to the left). Any suggestions would be GREATLY appreciated, I'm taking stabs in the dark but am not coming up with anything that works.
View 6 Replies
View Related
Aug 27, 2009
Column A: Start Date
Column B: End Date
Column C: Ethnicity Code (letter and number such as B1)
Column D: Hours
What I need to do is work out how many hours each ethnic group did in a specific month.
View 14 Replies
View Related
Apr 24, 2008
I have 20 sheets set up exactly the same with employee payroll and another sheet that lists all of the unique names and id's. I need to get a total sum of all the sheets per employee. Please note that some employees can appear multiple times on a sheet.
******** ******************** ************************************************************************>Microsoft Excel - Book2___Running: 12.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutA1=ABCDEFG1last namefirst namePositionIDGenderDeptamount2JonesJohnX89891MF410$1,830.003JohnsonMikeX89892MD167$2,220.004AllenRayY89893MF410$675.005ThompsonDavidY89894MG43A$300.006JonesAlZ89895MHYJ$195.007PhillipsTomC89896MT567$150.008SmithBenV89897M67L$240.00Sheet1 [HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name boxPLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
View 9 Replies
View Related
Apr 23, 2009
I'm trying to sum a criteria of all M's in one column that are x's in a different column, throughout multiple worksheets.
I'm able to get the summary number for 1 worksheet using the below formula (*W1 is the worksheet name); however, how do i encapsulate all the worksheets (lets say W1 through W10), please note that some of the worksheets have different ranges (meaning, not all are from Row 2 to 6)
=SUMPRODUCT(--(INDIRECT("'W1'!C2:C6")="M"),--(INDIRECT("'W2'!D2:D6")="x"))
I tried to replace W1 with W1:W10.
View 9 Replies
View Related
Jul 18, 2006
I have a lot of paperwork that needs to be entered into Excel. When I finsih entering the data, there will be many workbooks containing many different worksheets. I know how to summarize each workbooks but is there a way I can add specific columns in each of those summary sheets into a new workbook? I guess the question is can I sum data from different workbooks into a new workbook?
View 5 Replies
View Related
May 9, 2014
I am looking for a formula which will sum numbers with less than symbols in front of them (i.e. they are text cells), and then replace the less than symbol again in the summed cell if initially present. The problem is that not every cell contains a < symbol, some of them are just numbers, and not every column contains a < symbol either.
e.g. I am looking for a formula which if entered in row 5 of this example would give these answers.
A
B
C
D
1
<0.001
<0.1
0.2
<0.01
2
<0.0001
0.1
0.2
<0.1
3
<0.0001
<0.2
0.2
<0.1
4
<0.001
<0.1
0.2
<0.01
5
<0.0022
<0.5
0.8
<0.22
View 11 Replies
View Related
Jan 14, 2014
I have a summary tab in which I am trying to sum data based on specific variables from 30 other tabs in the worksheet
- In the summary tab, I have months (one year worth) over the top row and consultant names in the first column
- Each other tab represents a project
- I want for consultant 1 in summary tab, to have:
For january, the sum of dollars spent in january in each project (so across all tabs)
Same for february to december.
I have attached an exemple Note that the consultant names will always have the same syntax but will not necessarily be in the same cell in each tab.
View 5 Replies
View Related
Jan 16, 2012
formula that will find "John Doe" through sheets 2-10 and check the Win column for a "w"..if a W exists, Sheet 1 will calculate numericaly how many times it shows progressively, but only for his name and not others.
Sheet 1 B7=John Doe
C7 = total W's though sheets 1-10 for John Doe
Sheet 1
B7 C7
John Doe total W's
[Code]...
This is a alteration to an existing question I asked 2 Days ago, I redesigned a new spread sheet to start over with a new approach to it.
View 2 Replies
View Related
Oct 8, 2012
I have 199 tabs in which i have, for example, sales data month by month. I want to consolidate into one tab the total sales per tab. I.e. so that i have a list of tabs 1 to 199 with the sales for the year for each tab. I don't want to sum the same cell across each tab.
Is there a way of doing this without having to do 'sum(tab1...)' for my tab 1 sales and then 'sum(tab2...)' for my tab 2 sales etc?
View 2 Replies
View Related
May 20, 2013
I'm trying to get a more manageable formula for totaling multiple values in one box using Vlookup. For clarification this is what I mean:
On spreadsheet A, I have this table:
[IMG][/IMG]
The value in B2 is the name of the item I am making and the items below are the components required to manufacture said item. In order to build them, I need so many (Column E) and I have indexed my remaining values simply by doing =E3-H3. To build each component requires minerals which are listed on a seperate sheet (Sheet B) as such:
[IMG][/IMG]
The only Value in the above table I am truly interested in is "Current" (E Column).
Back on SheetA, I have a second table which adds all of the component minerals up for a grand total of the minerals required to make the item in B2 as such:
[IMG][/IMG]
Now, this is my issue: The code for N3 is incredibly unwieldy:
=IF($F$3>0, $F$3*VLOOKUP($L3,
'Component Materials'!$A$15:$E$21,5,FALSE))+IF($F$4>0, $F$4*VLOOKUP($L3,
'Component Materials'!$A$25:$E$31,5,FALSE))+IF($F$5>0, $F$5*VLOOKUP($L3,
'Component Materials'!$A$45:$E$51,5,FALSE))+IF($F$6>0, $F$6*VLOOKUP($L3,
'Component Materials'!$A$55:$E$61,5,FALSE))+IF($F$7>0, $F$7*VLOOKUP($L3,
'Component Materials'!$A$65:$E$71,5,FALSE))+IF($F$8>0, $F$8*VLOOKUP($L3,
'Component Materials'!$A$115:$E$121,5,FALSE))+ IF($F$9>0, $F$9*VLOOKUP($L3,
'Component Materials'!$A$135:$E$141,5,FALSE))
I set this up to look at a specific value and if it was >0, it would multiply that value times whatever value it found on SheetB ("Component Materials"). The size of this formula makes this difficult to migrate to further items, so I would like to reduce the complexity of the formula.
View 7 Replies
View Related
Jan 13, 2014
I have made a basic holiday planner, where each employee has one worksheet which shows 52 x 5 day weeks.
When an employee asks for holiday, I put a 1 in the corresponding day (cell). What I need to happen is that if 4 first aiders all ask for holiday on the the same date a warning User form loads up.
The names of the 4 worksheets are;
"Jason L 2014", "Sharon L 2014", "Alan B 2014" and "Chris M 2014".
The ranges for the 5 day weeks are
"B7:F7", "L7:P7", "V7:Z7"
"B10:F10", "L10:P10", "V10:Z10"
"B13:F13", "L13:P13", "V10:Z13"
"B16:F16", "L16:P16", "V16:Z16"
[Code] ........
The code should not run the User form until the sum of the same cells across the 4 worksheets = 4.
By this I mean if 3 of the first aiders book B7 off, the code searches the 4 worksheets and if the sum is 3 then nothing happens. However if the 4th and final first aider tries to book the same day off, when the code runs it totals 4 and the User form runs.
View 1 Replies
View Related
Jul 22, 2014
I am trying to create an inventory control system that keeps tracks of what's in bins based on additions and subtractions to the bin. I am hoping to generate a summary output of bin contents based on the transaction list. I know how to do this using pivot tables, but am looking for a VBA or excel function solution since I will have hundreds of bins and thousands of transactions.
Bin number
Product Code
Pounds
1
A
50
1
A
-25
[Code] ......
I want to have the following table auto generated.
Bin
Product Code
Sum Quantity
1
A
25
1
D
75
[Code] .......
I'm using an array formula right now, but it is proving to be extremely slow.
=IF(ISERROR(INDEX('Harvest Generator'!$E:$I,SMALL(IF(LEFT('Harvest Generator'!$E:$E,LEN('Harvest Generator'!$E:$E))=LEFT(B$3,LEN(B$3)),ROW('Harvest Generator'!$E:$E)),ROW(1:1)),B$2)),"",INDEX('Harvest Generator'!$E:$I,SMALL(IF(LEFT('Harvest Generator'!$E:$E,LEN('Harvest Generator'!$E:$E))=LEFT(B$3,LEN(B$3)),ROW('Harvest Generator'!$E:$E)),ROW(1:1)),B$2))
Where Harvest Generator is the sheet where my table is on.
View 2 Replies
View Related
Jul 4, 2008
I have circa 500 sheets (all with identical layout) in the same workbook. All the data is displayed in Columns "A" and "B". The entries in Column A are variable (5-6 digit numbers) B contains numbers between 1 and 200.
I would like to be able to add together the sum of the numbers in B against an entry in A- I have a list of all the entries in column A.
The data in column A is in ascending order but may not always be in the same cell reference.
E.g. "123456" and appears in 3 sheets
(sheet2) A9 ="123456", B9= 5
(sheet 234) A111="123456", B111= 7
(sheet 456) A87 ="123456", B87=3
"123456", total 15
View 9 Replies
View Related