Variable Condition In Sumproduct

Nov 25, 2008

I have the following formula

=SUMPRODUCT(INDIRECT($B3&"I3:I1000")*(INDIRECT($B3&"K3:K1000")>0)*(INDIRECT($B3&"u3:u1000")=$F$1)*(INDIRECT($B3&"p3:p1000")=$D$1)*(INDIRECT($B3&"r3:r1000")=$H$1))

Cells F1, D1 and H1 contain dropdown lists matching values in the referenced columns, PLUS they all contain the option All, which effectively means that the condition should return true.

I need something like if($F$1='All',1,(INDIRECT($B3&"u3:u1000")=$F$1))), but this doesn't work

View 9 Replies


ADVERTISEMENT

Sumproduct Given A Condition?

Apr 7, 2014

I am trying to arrive at the results in the yellow cells without needing the blue cells inbetween.

A sumproduct would be best but the 2nd row of blue cells has an if statement in it.

View 3 Replies View Related

SUMPRODUCT Using A Condition

Jun 20, 2014

I would like to create a formula in D7 that calculates the weighted average growth for products (column A) manufactured by Bob (column B). In J5 I've inserted the expected result using a SUMPRODUCT function.

How to create a formula in D7 that will calculate from the data in B6:D6 the same result as in J5. i.e. How do I make the SUMPRODUCT function only consider data in columns C and D when Bob is the manufacturer?

View 2 Replies View Related

Sumproduct With More Than One Condition

Oct 23, 2007

Here is my dilemma I have 3 columns with data ranges two of which need to match certain criteria and if the criteria is met then I want the 3rd columns data to be sumed.

For instance: I want all only want to add column c for the ones in Column a that have blue and column b that have lost.

ABC
bluelost1
greenfound2
purplelost3
bluelost4
greenfound2
redlost3
orangefound4

View 4 Replies View Related

More Condition With Sumproduct?

Mar 3, 2009

I want to make some general tab from source in other sheet. I want to count unique product based more condition and also sum the amount for people and product.
It is better to understund in my atach.

View 4 Replies View Related

IF ELSE Condition With SUMPRODUCT?

Aug 7, 2013

I have a SUMPRODUCT formula that checks several columns of employee data for various conditions and sums up a salary value, which works just fine. But now I have to put a cap on the salary amount when summing up each employee, which I thought I could use an IF statement for, but alas just returns a #VALUE! error. Essentially what I tried was

Code:
=SUMPRODUCT( --( Range1=A1), --(Range2=B1), IF( SalaryRng>200000, 150000, SalaryRng) )

I thought since I was returning numeric values from the IF statement there shouldn't be a problem. Obviously not. So my question is whether an IF statement can be used this way, and if not, what method should I use? SUM/IF array formula?

View 5 Replies View Related

Sumproduct With Condition Formating

Nov 5, 2008

I have two columns from which criteria must be satisifed. column A denotes gender (m or f) and column B denotes a number of points. I want to sum those males who achieve >4 in one cell and those females who achieve >4 in another cell.

View 3 Replies View Related

SUMPRODUCT Formula With Criterion Condition???

May 8, 2009

see the attached spreadsheet. Basically I want the formula in the yellow cell to carry out a sum product of two columns, but only for rows where the value in the first (criterion) column is 10.

View 2 Replies View Related

Double Condition (where Sumproduct Won't Work)

Jun 30, 2008

my table is something like below:

my program sheet looks something like this:

I need a double condition formula to check the date, if matches the date Column (A), and matches product Column (b), then returns Column (C) which is the doc#.
I Could easily do it if it is a sum product formula, but in this case, it is alpha numberic.

date: 14 Jun (dd / mm)
product -- Doc#
apple ---- ac21 (so what formula do I put here?)
Orange --- abc2 (formula?)

date --- product --- Doc#
12 Jun -- apple ----- abc1
12 Jun -- Orange --- ab12
14 JUn -- Apple ----- ab21
14 Jun -- Orange ---- abc2

View 16 Replies View Related

Change Sumproduct Formula To Incorporate Condition

Mar 3, 2014

I have have sumproduct formula that works well, however I need a section of it to use a condition.

"=SUMPRODUCT(--(('Input Sheet'!$A$10:$A$20009=3)+('Input Sheet'!$B$10:$B$20009=1)+('Input Sheet'!$C$10:$C$20009=1)=3),--('Input Sheet'!$L$10:$L$20009>=G21),--('Input Sheet'!$L$10:$L$20009<=J21))"

The first section ('Input Sheet'!$A$10:$A$20009=3) looks at column of data and checks if any of the data says 3, however I need the formula to look at the column of data and determine if the figure is =>3 and also =<5.

View 5 Replies View Related

Sumproduct Returns A Zero In False Condition, Instead Of A Blank

Jan 8, 2007

I've written a sumproduct formula, which does what I want it to do; but it returns a zero in false condition, instead of a blank. I've tried several things, but don't seem to be progressing very far. Here's the formula that I ended up with.

View 9 Replies View Related

Adding Condition To SUMPRODUCT Causes Result To Go Up? (2007)

Jan 22, 2010

Adding condition to SUMPRODUCT causes result to go up? (2007). I have the following formula:

View 5 Replies View Related

Excel 2003 :: How To Use List Or OR Condition In SUMPRODUCT

Oct 30, 2009

How to include a boolean OR in my SUMPRODUCT formulas.

Software: WinXP SP2 and Excel 2003 SP3

I'll try to type in some data in legible format:

......Col B.....Col C.....Col D.....Col E.......Col F
1...NW OH....WMA.....110%....NW OH...(result)
2...NW OH....SIS.......130%
3...SO FL......PRB........92%
4...NW OH....TRO......104%

I want to sum the contents of Column D when Column B = a given text value located in Cell E1 AND Column C = text value #1 OR text value #2 OR text value #3, and plunk the result in Cell F1.

So for example if I have NW OH in Cell E1 and my values to match in Col C are WMA, SIS, or PRB, I need a result of 240%.

I am using dynamic ranges for the contents of Columns B, C, and D: CALC_AFFIL, CALC_TITLE, and CALC_PERC respectively.

I have tried:
=SUMPRODUCT(--(CALC_AFFIL=$E1),--(CALC_TITLE="WMA")+--(CALC_TITLE="PRB")+--(CALC_TITLE="SIS"),CALC_PERC)
=SUMPRODUCT(--(CALC_AFFIL=$E1),--(CALC_TITLE="WMA")+--(CALC_TITLE="PRB")+--(CALC_TITLE="SIS"),--CALC_PERC)

Also tried both the above formula w/o the "--" in front of any array.
=SUMPRODUCT(--(CALC_AFFIL=$E1),--(CALC_TITLE={"WMA","PRB","SIS"}),CALC_PERC)

Again, the above was tried with and w/o the combinations of "--" in front of arrays.
=SUMPRODUCT(--(CALC_AFFIL=$E1),--ISNUMBER(MATCH(CALC_TITLE={"WMA","PRB","SIS"},0)),CALC_PERC)

Once more with and w/o "--" combinations.

View 7 Replies View Related

Adding Another Condition To Sumproduct (countif) Statement

Oct 6, 2011

I am using the formula below to count the occurences of relevant text strings (names) in a cell that can contain many separate strings. It works great. "References!$F$2:$F$34" contains my list of names and the formula returns how many occurences there are in each cell.

What i'd like to do know is work in a date criteria. Each name has an associated relevant date attached to it as does each cell that I am looking for these names in.

So...in english what Id like to do is alter my formula so that when it finds a text string that exists in "References!$F$2:$F$34", it then compares the associated date in "References!$G$2:$G$34" with the date associated with N3 which happens to be O3.

SUMPRODUCT(COUNTIF(N3,"*"&References!$F$2:$F$34&"*"))

View 5 Replies View Related

SUMPRODUCT Syntax With Variable VBA

Dec 14, 2009

I need syntax using SUMPRODUCT. I have these two lines of code

View 2 Replies View Related

Evaluate Sumproduct With VBA & Variable Row

Feb 5, 2009

I cant see the wood for the trees! I have this formulae which works just how I want

ACO2 = Evaluate("= SumProduct((K2:K3=""Closed"") * (EG2:EG3=""06-15 Days""))")

However when I change this to a dynamic range I keep getting a syntax error. Can anyone see where I have gone wrong? I know its probably only a " or an ) out of place but its driving me mad!!!

ACO2 = Evaluate("=SumProduct(((Range("K2:K" & Lrow)=""Closed"") * ((Range("EG2:EG" & Lrow)=""60 Days+""))")

AC02 is an integer, as is Lrow (its a simple loop which works out how many rows there are).

View 3 Replies View Related

Variable Range In Sumproduct

Sep 29, 2007

I am performing a sumproduct calculation in an array form. The first three columns in the data table have criteria, " Name", "Letter" and "Multiplier". The following 5 columns have days of the week, "MON", "TUE" etc. What I am trying to achieve is to use a sumproduct array to muliply the "Multiplier" criteria against a particular "Day" criteria when "Name", "Letter", and "Day" criteria match a series of reference cells. What this requires me to do is to define the "Day" range of values differently when I change the "Day" criteria. How do I create a variable range?. example file attached.

View 4 Replies View Related

SUMPRODUCT With A Variable Range Over Multiple Columns

Sep 15, 2014

I have an issue with SUMPRODUCT. My data is the budget for different items as follows

Column C has criterias such as Payroll, Expense or Fringes.
Column D has criterias such as "32", "43"
Column E to P are the numeric value (budget) by month (Period 01 to Period 12)

I am trying to create a formula that, for a given month, will sum the budget according to specific criteria.

For example, I want the value of the budget for "Payroll" + "32" for Period 1.

I managed to do that with the following formula:

E18 = 1
E16 = Fringes
E17 = 32

"=SUMPRODUCT((INDEX($E$4:$P$12,0,MATCH($E$18,$E$4:$P$4,0)))*($C$4:$C$12=$E$16)*($D$4:$D$12=$E$17))"

I used INDEX/MATCH so that the range into which the sumproduct will look for data to sum is variable and depends on what I want (I can easily change E18 to any period for which I would like to see my budget).

Now, I would like to take this to the next level and ask for a range of a column. For example, I would like to know the value of budget for "Payroll" + "32" for Period 01 + Period 02 + Period 03. How can I do that? I tried adapting the INDEX/MATCH but got no results.

Test on SUMPRODUCT.xlsx

View 6 Replies View Related

SUMPRODUCT To SUM Variable Range In Closed Workbook

Feb 12, 2010

I have a closed workbook with data in 12 columns. I have an other workbook where I choose a column and the formula needs to return the sum of the data from column 1 to the chosen column, in a given row. I can't use INDIRECT or SUMIF because of the closed workbook, so I'll probably need a formula using sumproduct, but I can't find a solution on the net.

View 2 Replies View Related

COUNTIFS With A Variable Condition

Apr 1, 2009

I am using COUNTIFS to work a formula for finding an average of a SUMPRODUCT. Formula:

View 2 Replies View Related

Array Formula With Variable Condition

Jan 7, 2009

I am running an array formula which is working fine except that I now need to add a further condition: that a one of a number of values in cells C1:C8 is found in range $a1:$A500. I've tried Or with comma separation and with * separations but nothing seems to work.

Can anyone advise me of the syntax?

View 9 Replies View Related

Cell Equals 0 Changes When Condition Met - Leave Unchanged When Condition False

Mar 24, 2014

I am trying to perform a calculation in a cell that leaves the value 0 if before Feb 2014, changes to the value of another cell in Feb 2014 and leaves the value unchanged if after Feb 2014. I can get to the Feb 2014 value but after that month the value changes to 0.

The Cell formula that I am trying to use is as follows:

=IF(YEAR($A$3)<2014,"0",(IF(YEAR($A$3)>2014,H114,(IF(MONTH($A$3)<>2,H114,AA118)))))

A3 contains TODAY()

H114 is the cell being calculated

AA118 is the cell containing the calculated value for the current month.

View 2 Replies View Related

Multi Condition Format? Lookup And Date Condition Valid For

Aug 13, 2009

I would like to try and achive a conditional format that will require a lookup function. when the condition is met it places Yes or No into a cell and changes that row colour to red for the NO condition. and after 10 days from now the rowcolour is removed.

View 6 Replies View Related

Conditional Formatting :: Condition 1 Override Condition 2?

Feb 29, 2008

I'm having trouble with the two formulas working in conjuction with each other.

Condition 1:
=(MOD(ROW(),2)=0)*(COUNTA(3:3))

Condition 2:
=TODAY()>=A1

"Condition 1" seems to override "Condition 2"? Ever see that?

View 9 Replies View Related

How To Count Condition Based On Having Another Condition

Apr 12, 2014

So I have one sheet that needs to pull data through to another sheet (which is a stats summary)

I have a drop down list containing 4 options all of which have to be counted separately on the stats summary sheet. However I only need them counted when a value is input in another cell in that row.

For example: I select option 1 from down down menu, but I only want this to be counted on the stats page when I enter a date in the "date" cell.

View 9 Replies View Related

Return Values Of Adjacent Cells When Condition Is True Omitting Values Where Condition Is False?

Jan 15, 2014

Here's a simplified example:

ColA
ColB
ColC

Row1
A
Y
A

Row2
B
N
D

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

I'm looking to return the values in column A adjacent to the cells in Column B equal to "Y". The kicker has been returning only the cells where the condition is true. Column C displays the desired behavior.

The closest I've been able to get is with a simple IF statement but I'm pretty sure the answer is a far cry away from there and likely requires an array formula. I'd prefer not to use VLOOKUP or OFFSET but will if the alternative is very complex.

View 7 Replies View Related

Set Variable: Object Variable Or With Block Variable Not Set

Jun 4, 2007

I have the following code (just pasting the relevant section) which crashes when it reaches the highlighted line of code. and a dialog box pops up with the text: "Object variable or With block variable not set"

Sub test()
Dim StartRng As Range
Dim Buffer As Range

Set StartRng = WorkSheets("Sheet1"),Cells(1,1)

StartRng.Activate
ActiveCell. CurrentRegion.Select

Buffer = rngStart.CurrentRegion.Copy

' I also tried the following line of code but that didn't work either
'Set Buffer = rngStart.CurrentRegion.Copy
..
...
End Sub

View 9 Replies View Related

Subtract Days Between Due Date And Today Date If Condition 1 And Condition 2 Are True?

Feb 2, 2014

I need cell (O4) to display days overdue or days remaining on an assigned task based on subtracting due date (M4) from todays date, but only perform days subtraction function if (M4) is not blank and only if task complete cell (N4) is less than 100.

Have the conditional blank cell figured out, but nesting another condition for the less than 100 complete cell. So in other words, I don't want cell (O4) to subtract days and display any error, irrelevant data if there is not any due date entered or the task is entered as complete...

View 3 Replies View Related

Insert A Variable Number Of Rows And Copy And Paste From And To Variable Positions

Aug 8, 2009

On the attached Excel file, I have code that will insert a variable number of rows and copy and paste from and to variable positions. That all works fine when run from a command button, but when I try to run it from the Worksheet_Calculate by entering 1 in J1 or K1 (inrange cell is J1+K1 for testing purposes) the CommandButton1_Click sub runs continously until an error occurs.

View 4 Replies View Related

2007 Macro: Run-time Error 91:Object Variable Or With Block Variable Not Set

Feb 20, 2009

I'm fairly new to macro's and VBA, by searching on the internet i've copied and pasted some code together into a macro.
But it ends in a Run-time error 91...

The macro opens a target .xls file in a selected folder, performs copy - paste actions from masterfile to targetfile.
Than it filters data in the targetfile sheet1 and copy's the results to the various other sheets; saves and closes the targetfile.
The next target file in the folder is opened and the actions are repeated in this second target file.
For the first target file this works smoothly; but for the second one (of a total of around 100) it does not copy the filter results to the other sheets in this workbook.
The error message i get is: "Run-time error 91:Object variable or with block variable not set."
When i hit debug it highlights the line "ActiveSheet.Next.Select" which, at least in the first file, seems ok.

View 9 Replies View Related







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