SUMPRODUCT With 2 Criteria, But One Is A Maximum Number Of Items To Include
Jan 14, 2009
I have no problems figuring out SUMIF or SUMPRODUCT with multiple criteria, but I'm trying to help someone with an issue that the second criteria is actually not all-inclusive.
Column B - Lots of numbers, the SUM range
Column C - Yes and No flags. Y or N
C1 = maximum number of matching items to include.
So, =SUMPRODUCT((C2:C100="Y")*(B2:B100)) sums up ALL the Yes rows, but the guy wants to restrict it to the last X matches, and put that X factor in C1. So if C1=5, only the last 5 Y matches are included.
I have a criteria issue with a sumproduct formula i'm using. The criteria is essentially supposed to say "if the value in column I (in Sheet2) equals ANY value in column O (in Sheet1), then do not include that line in the SUM. Here is the complete formula:
I'm looking at the formula in Sheet3, cell F5. You'll see that the criteria "--(Sheet2!I:I<>Sheet1!O:O)" does not seem to be working. I need the formula to not include any values from Sheet2!E:E, where the corresponding value in column I does not equal any value in Sheet1!O:O. Also, these values can change by user so its not as simple as just typing them in to the formula as an array...
That VBA part of this is that it's in a macro, so if there is any way to make this easier using code instead of a simple formula.
=SUMPRODUCT(--(Jan!D9:D999 > 0)--(Jan!Y9:Y999="FALSE")) But it keeps returning the number of items in JanD9:D999 > 0 , when i want the number of items in column Y which contain "FALSE" if D is greater than 0.
In the following formula I'm looking for MONTH 1 (January) and WEEKDAY 1 (Sunday): =SUMPRODUCT(--(MONTH(Sheet1!$A$2:$A$6936)=1),--(WEEKDAY(Sheet1!$A$2:$A$6936)=1),--(Sheet1!$D$2:$D$6936=$D2),Sheet1!E$2:E$6936)
is it possible to find MONTH 1 and 2 (Janauary and February) and use the rest of the formula as is? Can the same thing be done looking for MONTHs 3,4,5 or months 8,9,10,and 11?
I have attached a spreadsheet with a small indicative data set to assist in understanding. I am trying to count the number of documents each individual has assigned to them that are not yet 'completed' (ie REGISTERED, IN WORK, REVIEWED). The problem I am trying to overcome is that the document state can be 1 of several values indicated in the same column.
I have tried using this SUMPRODUCT formula: =SUMPRODUCT((($E$2:$E$11="REGISTERED")+($E$2:$E$11="IN WORK")+($E$2:$E$11="REVIEWED")*($B$2:$B$11="Jones"))) but it is generating incorrect values!
Specifically: - Jones shoulld return 1 - Franks should return 3 - Smith shoudl return 0
i'm trying to caclulate the max number based on two colomns criteria. For example if column A equal MC1 and column B equal 1 then find the max value of that group. I tried using sumproduct but so far it only works if i have one criteria wasn't too sure how to use it for two criterias. See attached file
=SUMPRODUCT(--(GLCodes=$B7),MasterNetAmt_01) I want to dis-include the CC="06" in the summation. I tried using: =SUMPRODUCT(--(GLCodes=$B7),(cc="06"),MasterNetAmt_01)
Though i wanted to rid the Na error from it when C is blank
I seen a few ways, And wanted to try the method of using Countif becouse it can be used withen the same cell without using extra cells like another method i seen "=IF(ISNA(A1),0,A1)"
what i know of countif This function counts the number of items which match criteria set by the user. =IF(COUNTIF($A1,"")),LOOKUP($C1,$A1:$A1,$B1:$B1),"")
so how the heck can the countif function be used to rid the NA of a lookup. i just cant see a relationship between counting a lookup.
I'm using Excel 2007 and have an Employee Scheduling Program that keeps track of 10 employees on a monthly basis (1 worksheet per month). The days of each month are in columns (I thru AM) and my 10 employees are in Rows 6 thru 15, which creates a grid of cells. I use Conditional Formatting to highlight the Weekends, Todays Date, and Holidays. My Sumproduct formula (shown below) is in each of the cells of my grid and places a number (1 to 10 for each employee) from start date to the end date. My Current formula works great as it finds every occurrence of the argument but I need to modify it to include the contents of the Helper Column.
I was hoping that my formula would give me the count number based on the Maximum time (latest time) and the Name field...My result is a 0 instead of 62 (the correct answer).
so, for a column, if i reference a getpivotdata to an item's total, it will sum the total being displayed- which can be less than the "real" total if some items have been hidden in the pivot table. what i want is to have getpivotdata (or another function, i don't care what it's called) to always sum an item's total for the entire pivot table range- irrespective of whether certain of it's details have been hidden. ideally, what i'm trying to do is:
sum the total of an item for the pivot table range sum the total of the column from the original data compare if they are not equal, the pivot table has not been refreshed
i need to do this without macros. (it's my "solution" to see if macros are enabled or disabled- because my pivot table automatically refreshes data based on macro)
I am using Excel 200o to create a PivotTable but am having problems wiht the Totals. Is it possible to create a PivotTable that includes hidden items in the Totals (row)? I tried the Subtotal Hidden Page Items option but this seemed to do nothing to the Total or subtotal.
I am trying to count the number of rows that have values greater than 10/01/2008 in either of two fields. I tried following formula but instead of giving total number of rows, it returns a random date.
I have a list of items in column A. Column B has each item's net price. Columns C-N shows the consumption of the items per month. Column O shows in which location the items are stored.
I need to do a sumproduct so that it shows the value of the items retrieved from that particular location per month.
If it didn't have to be by location, I would've simply done something like =sumproduct($B1:$B10,C1:C10) and copied it across the columns. How do I tell excel to sum per location as well? I know there is a simple solution to this, just not seeing it...
EDIT: I tried =SUMPRODUCT(($B1:$B10)*(C1:C10)*(O1:O10=$B1)) but it gives a #VALUE error
Having a hard time putting this one together..Trying to do: Create a formula that counts how many cells in Column L, that fall within a date range and also have a specific category of "text" (Column E). What I've tried:=COUNTIF($L$4:$L$166,"
I need the values that are copied from the template to copy over in text form from the "Data" Tab. Secondly, the master sheet has multiple lines for each vendor. For the area highlighted in red I'd like for it to copy all cells in column C for the vendor and search the vendor by name. Then, move to the next sheet.
I want to find the maximum in column C if Column A = b but I don't want the number if it equals 11 or 9. So, the answer should be 7, but I don't know how to create the correct formula..I'm sure I have to nest a couple of things into an array, but I just can't seem to get it to work.
I have a set of data (assume 2 columns, one with a long name and the second with a time). The names contain variables that must be used as criteria (a single entry may contain "Blue" and "On"/"Off") and times vary, based on when the Name turns "On" or "Off" [in minutes: 25 (On), 47 (Off), 89 (On), 100 (Off) and 137 (On)]. I need to create another table that automatically inserts values for all times, to include the missing times (0 min thru 24 and 26 thru 46, etc.). EX: If the first entry is "Blue-On" at "25 minutes", the cells from 0 minutes to 24 minutes are each "0" and become a "1" at 25 minutes - the following cells are "1" until 47 minutes (where it is turned off). (1 and 0 represent "On" and "Off", respectively)
How can I created a formula to insert the correct numbers into the correct places? I'm willing to have multiple cells with formulas and simply hide the columns that are doing the calculations.
I need a macro that will search MIN and MAX columns and identify which horse has the maximum number in both the MIN and MAX columns an example is highlighted yellow in the attached spreadsheet. If there is a selection i want the macro to keep the horse that matches the criteria along with the race date and time e.t.c (header) but delete all other horses in that race. If there are no selections that meet the criteria in a race i want it to delete all details for that race including headers and go to the next race.
A B C Country Revenue Month 1 UK 10 Jan 2 France 20 Jan 3 US 30 Jan 4 UK 25 Feb 5 US 35 Feb 6 France 5 Jan
and so on...
So where country = UK, France or US I want to retrieve the MAX revenue from all months and which month it was in. Eg UK max revenue was in Feb of 25. I am not sure how to apply the max formula with criteria. Is there any way to do this?
Problem: Range A2:C10 contains the login and logout times of various ID's. Each ID could log in and out a number of times a day. How could we find the first time a specific ID logged in and the last time that same ID logged out?
Solution: For each of the ID's in range A2:A10, enter two Array Formulas. To find the first login time (Column B) enter the following formula: {=1/MAX((A14=$A$2:$A$10)*($B$2:$B$10 To find the last logout time (Column C) enter the following formula: {=MAX(($A$2:$A$10=A14)*($C$2:$C$10))}
I have a a set of date ranges. The start and stop date of the ranges are listed in seperate columns. I need to count how many of those date ranges include a specific month/year. Example data is below.
This is my formula and it returns: -55 bps. =[ASK.xls]QTR!$AT$81&" "&"bps"
However, I want it to return (55 bps). I don't want to just add the parenthesis because in the future this formula could return a positive number. I tried to format the cell differently, but that did not work.