K20GH
K20GH

Reputation: 6263

Add total SUM from VLOOKUP?

I've got 3 columns as follows:

Boolean          Value          Date
Yes               £3000         01-Jan-2012
No                £3000         01-Jan-2012
No                £3000         01-Nov-2012

Basically I just need to look at that table and come up with the total value for where Boolean is set to No, however only take those where the month is equal or less than the current month set by the computer time

Upvotes: 1

Views: 5099

Answers (2)

GSerg
GSerg

Reputation: 78175

Use the DSUM function.

Criteria range would be

Boolean         Month Check
No              =MONTH(C2) < X

where C2 is the first data cell in column Date.

Upvotes: 0

barry houdini
barry houdini

Reputation: 46341

Which version of Excel? In Excel 2007 and later try SUMIFS which allows you to sum with multiple conditions, i.e.

=SUMIFS(B2:B10,A2:A10,"No",C2:C10,"<="&TODAY())

I used cell references but you can used named ranges in their place like this:

=SUMIFS(Value,Boolean,"No",Date,"<="&TODAY())

or in earlier versions of Excel you can use SUMPRODUCT like this:

=SUMPRODUCT(B2:B10,(A2:A10="No")*(C2:C10<=TODAY()))

Upvotes: 2

Related Questions