How to get SUMPRODUCT on filtered cells

I'm currently using the formula

=SUMPRODUCT((F2:I1475>=1)*(F2:I1475<=9999))

This gives me the number of the full range of cells but I need this to 
update whenever I use a variety of filters. 

Any help is greatly appreciated

Sam.D


0
Utf
1/29/2010 2:21:02 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

1 Replies
1928 Views

Similar Articles

[PageSpeed] 12

Say we have data in A1 thru B29 like:

flia	value
0	pass
2	pass
1	pass
2	pass
1	pass
2	pass
0	pass
2	pass
1	pass
2	pass
1	pass
0	pass
2	pass
0	pass
1	pass
1	fail
1	fail
0	fail
2	fail
1	fail
0	fail
1	fail
2	fail
1	fail
1	fail
1	fail
1	fail
2	fail

and are appling autofilter to column a.  We want to use sumproduct to count 
the "pass"es in col B when filtered:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B100,ROW(B2:B100)-ROW(B2),,1)),--(B2:B100="pass"))
-- 
Gary''s Student - gsnu201001


"Sam.D" wrote:

> I'm currently using the formula
> 
> =SUMPRODUCT((F2:I1475>=1)*(F2:I1475<=9999))
> 
> This gives me the number of the full range of cells but I need this to 
> update whenever I use a variety of filters. 
> 
> Any help is greatly appreciated
> 
> Sam.D
> 
> 
0
Utf
1/29/2010 3:03:01 PM
Reply:

Similar Artilces:

How to get ride off this warning ?
Hi: I have a string resource defined. I need to pass this string ID to another function like this: void foo (UINT string_id) { CString str ((LPCTSTR)string_id); } During comiling, got error at casting ((LPCTSTR)string_id. But it works fine. Just wonder, how to get ride off this warning? Thanks In Advance! Polaris use reinterpret_cast<LPCTSTR>(string_id) > Hi: > > I have a string resource defined. I need to pass this string ID to another > function like this: > > void foo (UINT string_id) > { > CString str ((LPCTSTR)string_id); > } > ...

Filter with criteria!
Hello! I have 2 woorksheet. One contains raw data one is a summary sheet. In the raw data shhet, under the "catergory" column, I need to count and filter out all the Apples" in this column. The challege is , the number of apples counted should be from Jan, Feb and Mar respectively. Results counted must be shown in the second worksheet in Column A, B and C respectively, representing Jan Feb and Mar. Can I have the formulae for this ?Thank you.. -- help me Post few examples to show how your raw data is arranged. -- Jacob (MVP - Excel) "ernieta...

How to get free traffic to your website
The facts you should know about making money online! Hi , my name is Ben Durandt. -Discover how to get 1 Million visitors without paying a dime in advertising! -Discover how a young 31 years old man just became a millionaire on the Internet... in weeks! He paid cash for a Porsche 911 Carrera convertible and a giant domain with private lake in only 28 days. More than 20,000 people have been raging on his website every day! ... Because he just revealed HOW to do it! Heck, go there TODAY and See what he has to say! Click here : http://www.freeadguru.com/cgi-bin/i.pl?c=a&i=34180 -...

How do I get excel to accept (c) as text and not change to copyri.
How do I enter the text (c) in Excel without having it changed into the copyright symbol? Hi Daffyd, Try: Tools | Autocorrect | Select (c) | Delete | OK --- Regards, Norman "daffyd" <daffyd@discussions.microsoft.com> wrote in message news:8CCC3C1A-6F19-4F62-B934-8A71F236A4FD@microsoft.com... > How do I enter the text (c) in Excel without having it changed into the > copyright symbol? Go into the Tools Menu. Look for AutoCorrect. In the bottom half of the AutoCorrect Tab, look at the list for Replace text as you type. Delete the entry for (c). tj "da...

How do I fix this so I don't get an "Error 2015"
Dim x x = Application.CountIf("E5,E6000", "T13065") How do I fix this so I don't get an "Error 2015" Thanks, Rick Not tried it but I would think x=Application.Countif(Range("E5:E6000"),"T13065") Providing T13065 is a string you are counting. If it's a range reference x=Application.Countif(Range("E5:E6000"),Range("T13065")) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS www.nickhodge.co.uk "2D Rick" <rbrowniii@compuserve.com> wrote in m...

Getting an Error when there is nothing to show
-- The bottom of my report which is a statement shows #Error when there is no Invoices to add up. Can I have it blank instead. this my text Box Control Source thanks for any Help....Bob =Reports!rptOwnerPaymentMethod!subChildOwnerInvoiceAmount!tbAmount.Value Try: =IIf([subChildOwnerInvoiceAmount].[HasData], [subChildOwnerInvoiceAmount].[tbAmount]) Explanation in: Bring the total from a subreport onto a main report at: http://allenbrowne.com/casu-18.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.h...

Outlook 2003 Cant get to newsgroups
I dragged the NEWS icon from tools/customize/commands/go to the GO button on the tool bar. It worked fine then I got on a newsgroup and a posting that read "payback" multiple times. I didnot open the attachment. Next time I tryied to go to NEWS it was not there. How can I get newsgroup access back? Tryied reinstalling Outlook2003 and Office 2003 with no luck. Expect the answer to be in registry. Help please. I got the similar problem and got the fix. Here is what you need to do: - add the NEWS button under Go menu - accept Outlook Express is your default NEWS client - c...

I've got a formula for stones and pounds
Hello, I've got a column that displays a series of weights in stones & pounds (both in the one cell). How do I get a chart to recognise and display in the same format? Regards, mikelenno What is the format of the cells with stone & pounds It is best to enter such values a 10 3/14 and format the cells with # ??/14 best wishes from one who is INT(275,14) stone & MOD(250,14) lbs -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "mikelenno" <mikelenno@discussions.microsoft.com> wrote in message news:5AD608FA-5367-4CED-AD76-1F54228EFDBA...

Need help getting this code to compile under VS.NET 2003 (compiles under VS6.0).
I'm tasked with converting a LARGE project from VS6.0 to VS.NET 2003. Here is a VERY scaled down version of an error I'm getting. I must be getting rusty, but the way to get around this compiler error is just not coming to me. If you need to compile this, just create a Win32 console app and specify to add support for MFC, then copy this code into the cpp file and press compile. class CLogItem : public CObject { protected: virtual BOOL CheckConflict(CLogItem* pItem) const; }; struct MapEntry; //forward declaration.. typedef CArray<MapEntry, MapEntry&> CMapEntryArray;...

Summing distinct rows in same cell
Sorry for the bad title I'm not sure hte best way to sum up this issue. Fruit Price Total Apples 0.69 40 Bananas 0.34 38 Lemons 0.55 15 Oranges 0.25 25 Apples 0.5 10 Pears 0.59 40 Almonds 2.8 10 Cashews 3.55 16 Peanuts 1.25 20 Walnuts 1.75 12 Apples 0.5 5 Given the data above I'm trying to sum the totals for only the Appl rows. So basically I need to search the Fruit column find the row that have "Apples" and then sum their corresponding Totals, giving m 55. I've been playing with this for hours with Lookups and Indexes bu am not really getting anywhere. Also, I can...

I get COMException while exporting chart on IIS 6.0.
I have this code that works perfectly on my development machine when I deployed it at customer site it gets exception. Here is the error and my code: thanks error ========== Exception from HRESULT: 0x800A03EC. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC. Source Error: An unhandled exception was generated during the execution of the c...

Save As using contents of Cell in Name
Can someone help with code that changes the "save As" file name to combination of the original File Name + the contents of a cell, an saves file in same folder as the original. E.G. Original File Name= Timesheet Cells B1= Location Cell C1 = Date in format 3-5-2004 Cell A1 = concatenate(B1,C1) Fle Name will therefore be "Timesheet Location 3-5-2004" The other problem is with the date. When concatenating, how do I forma the date to avoid it looking like "Location 38051" Any help much appreciated Nic -- Message posted from http://www.ExcelForum.com Hi for c...

How to get a macro to do what i want?
I have designed a form in Excel and the data that is inputted i want to be able to save in a separate worksheet. The problem i am having is that eveytime i record the macro, it over writes the same row each time (if that makes sense). For example if i copied every cell in the form and paste them into the database Row 1, i then want the new piece of information inputted into the form to go into Row 2 and then Row 3 etc.... But it keeps going into Row 1, it wouldnt move down the rows. Hopefully this makes sense to someone and someone can give me some advise. Calculate the last row ...

Count on cell for each time it is changed
I would like to count the number of times a cell has been amended/ changed e.g cell b2 has the word red it it, in cell c2 i would like a counter for everytime the cell in b2 has changed, at the end of the day you get final number. Is this at all possible? Jelinek, You can do it by putting the following VBA macro in your sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$2" Then Cells(2, 3) = Cells(2, 3) + 1 End If End Sub Art "Jelinek" wrote: > I would like to count the number of times a cell has bee...

Cells Fill Automatically on Another Workbook
I've created what we'll call a seed worksheet to be used over and over for different clients. I have linked its cells to another workbook. As the originating seed worksheet directs its cell data to a specific cell on another workbook, how can I accomplish the workbook data not being overwritten but the new incoming data default to the next unused cell in the column? i.e. If the original seed worksheet cell B1 links to the worksheet cell A1, I would like the next instance of creating a new customer and his B1 information on his use of the seed worksheet to populate onto th...

formula to get sheet name
hi, can a formula retreive a worksheet name or does it need to be macro based? thanks, N.S. Hi Nigel, This formula that takes care of the possible situation whereby you have only one sheet in the workbook and its name is the same as the workbook's. Note: CELL("filename") will only work if the file has been saved at least once and if the file is opened in a different language system, the argument "filename" will need to be changed manually to the corresponding word (e.g. in Spanish "nombrearchivo"): =LOOKUP(REPT("z",255),SUBSTITUTE(MID(CE...

Concatenating cells but excluding blanks
Hello, I am trying to create a result field, concatenating populated cells from the previous 12 columns on that line, but excluding blank cells and putting a * delimiting character between each instance - please find below a 4 column example. ID 1 2 3 4 Result Z A C D A*C*D Y B C B*C X A B D A*B*D Each of the 10,000 lines of the spreadsheet is different - there are at least 5 blank cells on each line Any help gratefully received. I am working in Excel 2007 Many thanks. Bob Try this: http://img690.imageshack.us/img690/5826/nonamee.png Micky "Bob Fr...

Copy Data from One Group of Cells to Another Group
I have five columns of data on two different sheets in the same workbook. One set of columns is sorted in ascending date order the other in descending date order. When I enter data into the last row of Sheet 1, I need the data in that row in columns A, B, C and D to be copied into Sheet 2 columns A, C, D and E in a newly inserted row 14. Is this possible with the use of a macro? I can find the last cell in Sheet 1, but then need to go up one row and back to column A. I am having difficulty with that. Thanks is advance for any assistance offered! /s/ Alan Auerbach On Sat, 26 May 2007, ...

Text in column causing SUMPRODUCT error
Greegings. I have a SUMPRODUCT formula that is having errors when one of the columns has text instead of a NULL or a number. If I delete the text cells in that column it works as desired. I'll give a simple example. Suppose I have the following in A1:B6.... a 1 a 2 a abc b 1 b 1 a 2 And I need this... =SUMPRODUCT(($A$1:$A$6="a")*($B$1:$B$6)) It errors out until I delete the "abc" in cell B3, then it works as desired. I tried to replace the "abc" with a 0 by trying this... =IF(ISNUMBER(B3)=FALSE,0,B3) And it works for that pa...

Copy cell contents, then paste into the same cell with other text.
Hi! I tried a search first and couldn't find anything like this. My spreadsheet has a column for shipping that takes a series like this for each product: ?0.0*0.13.2*d*0x0x0:07:24:04 Following the question mark is the handling charge (0.0 in this example). This is followed by an * and then the weight of the item (0.13.2 in this example which is 13.2 ounces) I have a list of product weights in a colum with just pounds and ounces. I need to copy that information, then paste it into the weight area of the string above and then paste those modified contents back into t...

How to select other random cells
I have a 2 part question. I want to have a 1 question survey randomly filled out by 200 people. Column A lists the 1 questions. Columun b has ABCDE listed in cells B6 to b10. I would like 200 samples in columns c, d, e, etc. How do I set this up so that they randomly Coose B6 to B 10. Second part. On another spreadsheet, I have a similar situation, but the user has 10 answers to select from and I want them to randomly select all that apply. How would I do this? Thanks! ...

How do I get total value data labels in a stacked bar chart?
I have a 3-D stacked bar chart with four series and I want to have the total value in each category be displayed in a data label. Can I do this, and if so, how?? Hi, This should help http://www.andypope.info/charts/StackColTotal.htm Cheers Andy blemerson wrote: > I have a 3-D stacked bar chart with four series and I want to have the total > value in each category be displayed in a data label. Can I do this, and if > so, how?? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info Thanks, Andy. The CFO is thrilled. Heather "Andy Pope" wrote: > Hi, >...

Annoying Exchange 2003 Sender Filter Bug - Reported - Confirmed
The following is a MS confirmed Exchange 2003 bug, for which MS will not provide a bug fix. Perhaps in the next version of Exchange. Exchange Server 2003 is dropping SMTP connection WITHOUT any warning in SMTP logs or eventlogs, if 1. Sender Filtering for an incoming Virtual SMTP server is enabled 2. A "malformed" message without an empty line after the DATA command is send Here is one expample of a useless message created in a telnet session: 220 node1.exchg2k3.test.com Microsoft ESMTP MAIL Service, Version : 6.0.3790.0 ready at Thu, 26 Aug 2004 12:05:44 +0200 helo 250 node1.ex...

QSSession Rules & during a live transaction getting the item
I am developing a hook and one of the TRANSACTION class has a ENTRIES method which allows you to use ELEMENTS for example mySession.Transaction.Entries.Element(1).Description works just fine and so does everything else, but the mySession.Transaction.Entries.Element(1).Item does not work and I think it is because this has a different datatype than a string or an integer so I can not get it to work or read anything for the ..Item part of my hook. Any ideas or suggestions of where to go with this? Thank you. ClothingStore wrote: > Any ideas or suggestions of where to go with this? > T...

Outlook Junk mail filter and rules problem
Hello- I switched to Outlook from Mozilla Thunderbird. I did this because Thunderbird was unstable (at least for me). It did have a nice spam filter though. I was hoping that Outlook's spam filter would be comparable and the app would be stable. So far it's stable, but I am having a serious problem with the filter. I use Outlook 2004 to track several POP accounts. So when I download a message, I have a rule for each account that puts the message in an appropriate folder under the inbox folder. The problem is when I use the Spam filter, this is what happens. 1. Spam arrives to ...