# Sumif/Sumproduct Across Columns & Rows

Jul 2, 2009Is there a way to replicate this code, so I don't have to Do the With [CODE] .......

View 9 RepliesIs there a way to replicate this code, so I don't have to Do the With [CODE] .......

View 9 RepliesADVERTISEMENT

I'm using Excel 2003. The sumif function will not allow me to ignore hidden rows in my data set that have been autofiltered. I tried using the following formula and it worked:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(CopiedB!$I$2:$I$65000,ROW(CopiedB!$I$2:$I$65000)-ROW(CopiedB!$I$2),0,1)),--(CopiedB!$A$2:$A$65000=$A22),CopiedB!$I$2:$I$65000)

The problem I am having is that the sumproduct and offset funtions used to ignore hidden rows are considered "volatile" and force a recalculation. Moreover, I have this fomula pasted 100+ times and this dramatically slows things down even when I turn autocalculate off. Is there another way to accomplish a sumif with a user defined custom function in VB? I really need to have the ability to do a sumif that ignores hidden rows and is not dramatically slow.

See attached template I am working on. I want to calculate the number of hours worked over specific dates e.g. between 19-25 May 2014 and 26-31 May 2014 for employee "Bird, Ken" - the result is to be placed in cell D19. Tried sumproduct but without success.

celeste template.xlsxâ€Ž

Sumproduct help with criteria in Columns and Rows

View 9 Replies View RelatedI've not used SUMPRODUCT previously and can't understand how to get results for the attached.

I've tried SUMIFS but it doesn't work because I'm looking down columns and across rows, I'm assuming.

I've attached a summary of what I'm trying to achieve. I want to sum all costs with an R,P,I,G, etc. in column C for December '13 (E3) in the top table.

The second table is actually in a different sheet but is the source of the data I need added.

Sumproduct P&L.xlsxâ€Ž

ColAColBColC

1 FA4,000.00 10%

2 CB1,500.00 15%

3 FA7,500.00 15%

4 AA700.00 5%

5 JG250.00 5%

6 FA1,200.00 5%

7 AA900.00 5%

8 CB175.00 15%

9 FA2,000.00 2%

At the foot of the spreadsheet I would like to show the total of the calculation

Col B * Col C, if Col A shows a value of "FA"

Having veiwed similar posts, I believe SUMPRODUCT may be the correct formula, but I cannot seem to achieve the result I am looking for.

So in the example the desired result is 1,625 B1 * C1 + B3 * C3 + B6 * C6 + B9 * C9

How can I write a conditional sum formula that will skip a criterion when it is left blank?

I was able to make this work:

=CHOOSE(COUNTA(B:B),SUMIFS(F1:F4,D1:D4,B1),SUMIFS(F1:F4,D1:D4,B1,E1:E4,B2))

where column B has the criteria.

I was wondering if there was a better way using Sumif or Sumproduct.

in colum A i have a list of dates, in colum B i have a list of amounts. what i need to get is the sum of the amounts where the dates in colum A are between the dates in cells C1 & D1. Tries sum producst but all I get is the total sum of colum B irrelevant of the date!

i would to combined these together

can this be done

I have 4 columns, A B C and D. They are a mix of formats.

A= Name (text)

B= Date

C= Code (text)

D= Number

I need a formula that gives me the total from column D, provided conditions for columns A, B and C are met. The date condition is month only, so I'm using MONTH(1) for January etc.

I can find a formula if there are only three columns total (using SUMPRODUCT), but not 4.

I have a list of names and corresponding costs charged for each entry. The names appear multiple times for multiple costs charged, but contain any combination of characters after their name.

I am looking to get the sum of all entries for each name. I have tried the following formulae, but it does not return any information:

=SUMIF('Jan line items'!E:E,(CONTAINS:A:A),'Jan line items'!F:F)

I'm trying to do here is if a layaway has been paid off then there will be a tax amount in column C. IF there is tax in column C and column A has the word layaway (or the word way) in it then I need to find out how much the total of the layaway $ amount was. Meaning, to figure out how much the tax is for.

For example:

If the text in Column A contains the word way AND column C contains a $ amount then return the amount that the tax would be for. Of course this would be an accumulated amount for all of column C. So, if Layaway is in column A and $3.13 amount is in column C then it will return $50.00 as the original selling price. Tax here is .0625 %.

a1=good

a2 = 100

b1 = bad

b2 = 50

c1 = good

c2 = 100

would like to sum a2+b2+c2 only if a1,b1,c1 = good.

I need combining sumif & sumproduct. I have attached a file which explains what I need.

View 2 Replies View RelatedFrom some fleet data i am trying to total any journey which took place between two times.

The time format is hh:mm:ss. I want to total the miles travelled in each trip between 5pm and 5am for certain vehicles

Vehicle Registration is in colum A, the times of the journey are column B and the miles traveled are column D.

=SUMPRODUCT(--(A2:A100=LG52RYT),--(B2:B1000=NOT Sure???, D2:D1000)

Would I use the above formular? And what would i put in the section i have marked "not sure"?

I need to convert the following formula to a Sumproduct so the link will not be broken when I close the linked workbook:

=SUMIF('Z:WUTDaily Report[2010 Monthly Rpt - CPM - Thru November only.xls]2010 Expense'!$E$231:$E$332,"M&R Parts D",'Z:WUTDaily Report[2010 Monthly Rpt - CPM - Thru November only.xls]2010 Expense'!AE231:AE332)

I need to add amounts in column B, based on column A’s account numbers, so I want to add only account numbers, say 17101 & 17201 and nothing else.

View 9 Replies View RelatedI have a daily tracking sheet. I want (off to the right) to be able to enter start/end dates and have it sum the total grossage for JUST those dates alone. Which function do I use?

http://s401.photobucket.com/albums/pp94/nmweir/?action=view¤t=untitled.jpg" target="_blank">http://i401.photobucket.com/albums/pp94/nmweir/untitled.jpg" border="0" alt="Photobucket">

direct link? :

http://i401.photobucket.com/albums/p...r/untitled.jpg

I am using the SUMPRODUCT formula as a SUMIF with multiple conditions in the following format:

SUMPRODUCT(-(Range1=CellReference),-(Range2>0),Range3/Range2)

THis works with or without the 2nd condtion, but I thouht the "greater than 0" bit would eliminate the inclusion of 0's; however, the same #DIV/0 error occurs with or w/out that ">0" condtion as the 1st OR 2nd argument.

I speculated that b/c the final argument was dividing each paid of cells in either range instead of a typical sum, this caused the divisor error.

I am using the SUMIF formula to sum all the cells that meet a certain criteria and at the moment, this works fine. Now I want to extend the criteria to 2(3 later) conditions. I've read that the SUMIF function only handles 1 criteria. Is this correct? If so should I use SUMPRODUCT or DSUM? I eventually will have to check about 2000 cells in a workbook. Sample work book attached: where I need to total the price of all the items that are shoes and are red in colour. A pivot table beckons in the future, but for now I need this in a workbook format.

View 3 Replies View RelatedIm Trying to use a formula of countif or sumproduct

so the formula will read the range of cells from A2:A30 to see if the word Hydro is in any of those cells, then if the date range from Cell B2:B30 is from range =>Dec-01-2007 to =<Dec-31-2007, then it will count 1.

[Code] ........

But this formula doest count.

I've tried using a multiple if count if with arrays and sumproduct. I really want it to count the ammount of time the work hydro is used during the month on december .

I am trying to extract data all countries excluding Spain and Portugal and also exclude data for certain product classes (for example excluding Products X, Y and Z)

I have written the formula below which picks up data for certain criteria I have concatenated in tab "raw data" in column A:

=SUMPRODUCT(SUMIF('Raw Data'!$A:$A,B7&D3,'Raw Data'!$W:$W)=('Raw Data'!I:I"Spain")*('Raw Data'!I:I"Portugal"))

Notes: Cells B7 and D3 are used match criteria in Raw Data A:A

Column W is the data that I need to extract i.e the numbers

Raw data I:I is a list of all countries

However this does not exclude Products X, Y and Z, only excludes countries Spain and Portugal.

I wondered if there was an easier way to create a formula?

Why won't this SUMPRODUCT work?

SUMPRODUCT(Sheet2!D1:D2000=OPEN,Sheet2!F1:F2000)

I have a range (D1:D2000) that contains a 'Status' value.

OPEN is a named range that refers to eight possible Status values: Assigned, New, Hold, Re-test, In Progress, Failed, Ready for Push, Coded

The formula should sum the values in F1:F2000 for any row containing one of the eight statuses in D1:D2000.

-I have 3 relevant columns, A, B and C with 999 rows

-Column A is a status indicator "Yes" or "No" are the only options

-Coumn B a list of vendor names, which requires the wildcard example:"*Verizon*"

-Column C is the data range that needs to be summed

Right now i have this:

=SUMPRODUCT(--(A2:A999="No"),--(B2:B999="*VERIZON*"),C2:C999)

But, it seems sumproduct does not allow wildcard matches within it's "--" arrays. I am willing to try something else if possible, but I lack the excel knowledge to answer this myself.

I have a set of data as attached where the productivity of each staff is recorded on a daily basis.However, the cell in which their name is located on each tab of the day of the month might not be the same. I am thankful that the forum actually provided me with the formula located in cell c15.

1)However, I would appreciate if someone could translate what the formula means as I am not so sure what the formula represents.

2)The reason is I would like to calculate how many training days (TR), Medical Leave(ML) and Emergency Leave(EL) for the month of January for each staff.I tried modifying the formula but it didnt work.

3) Is it possible to use a vlookup function for this solution?

I have an array that contains order numbers, tracking numbers and shipment costs. I want to get the total value of the shipment cost per order. the problem is, there are some duplicate shipments (ie same tracking number) and I don't want to include those. I can't delete the duplicate entries from the database for reasons I won't go into here.

so I tired to use a formula like =SUMIFS(C:C,A:A,A1,B:B,B1)

A B C

11462046 CJ225083125US 10.51

11462051 CJ225082247US 17.04

11462046 CJ225083125US 10.51

11462046 CJ225083564US 22.40

the formula doesn't work (won't even let me enter it) but if it did, it should give a result of 32.91. it would add C1 and C4 (but not C3 because even though A3=A1, B# also equals B1 and that is what I don't want to add.

I think maybe a sumproduct formula is what is needed but the negative criteria is throwing me for a loop.

The attached spreadsheet has a "master" workesheet in which I enter customer info, salesperson info, and date. The totals spreadsheet automatically calculates number of sales, contact value.

I need to modify the following formulas to only calculate the data within a date range shown in 2 cells.

=COUNTIF(Master!A1:A176,PayPeriod!A4)

=SUMPRODUCT(--(Master!A1:A176=Totals!A4),(Master!K1:K176))

=E4SUMPRODUCT(--(Master!A1:A176=Totals!A4),(Master!K1:K176))

I am trying to do a dynamic sumifs that allows the user to use data validation lists to select 5 items to query. This is the easy part.

The hard part is that the amounts range to sum goes across 6 weeks and I want the answer to also take account of another validation input which specifies up to what week the range should be.

I have done a simply if statement in row 8 that flags weeks relevant to input cell B6.

How do I do a formula in say cell A16 that does the sumifs and acknowledges that the user has requested a dynamic range to sum?

Sheet1ABCDEFGHIJK1RegimePost 20052TypeBudget<<<<- Dropdowns3Prod AreaLoans4ChannelRetail5Pro/ReReactive6Week18-May-1178Flags ->1110009Regime 2TypeProd AreaChannelPro/Re04-May-1111-May-1118-May-1125-May-1101-Jun-1108-Jun-1110Post 2005Budget Loans Retail Reactive 36942041320736540011Post 2005Budget Cards Retail Reactive 38423444021726636212Pre 2005Actual Mortgages Tele Proactive 35739840536923740113Pre 2005Actual Loans Direct Proactive 3213872554552254621415Answer16Excel 2007

I am using Office/Excel 2007 and Windows 8

I want to determine the number of values SUMIF/SUMPRODUCT functions used/checked to arrive at the answer, i.e. 95 for row 2 and 116 for row 3. A function that can give a 3 and 2 respectively.

Example:

Results for Row #2 gives: 95 with 3 values picked up under "Rate"

Results for Row #3 gives: 116 with 2 values though three places were checked up under "Rate"

How can I count the number of these values referencing at the "Rate" like in the functions used.

I managed to use SUMIF/SUMPRODUCT functions to calculate totals based on "Rate" in row one.

I tried COUNTIF function, but allows only field/heading.

A

B

C

D

E

F

G

[Code] ..........

results for each formula used

95 formula: =SUMIF(B$1:G$1,B$1,B2:G2)

95 formula: =SUMPRODUCT((B$1:G$1=B$1)*(B2:G2))

3 formula: =COUNTIF(B1:G2,B1)

I am very comfortable with SUMIF, but need to search a range any any cell containing words or phrase "20%" then need to sum those corresponding cells only.

I.e., something like: SUMIF(A1:A10,..."20%",C1:C10) .... only sum all C cells where an A cell contains any combination of words with "20%" in them.

Copyrights 2005-15 www.BigResource.com, All rights reserved