Lookup and SUMProduct or SUMIFS?

gino59

Active Member
Joined
Jul 26, 2010
Messages
496
Hi all, I have the following formula which returns a sum from a table using two dates. I'm trying to add in an extra condition which is to sum between those two dates if the value in a cell equals a set value.

The formula is:
=sumproduct((mData[DATE]>=datevalue(L57))*(mData[DATE]<=datevalue(L58))*(mData[DEBIT]))

I'm trying to figure out how to add the new criteria which is looking in the same mData table [TRANS] column. In other words, look for the value in cell L59 which for example is Acct1xyz and sum all values from the debit column where the TRANS column = Acct1xyz and the dates are between the values in cell L57 and L58.

Clear as mud, huh? I hope someone can help!!!

Many, many thanks!
Gino
 
Perfect! That works great! I guess I better learn more about ISNUMBER - it's not the first time that's tripped me up. Does it have to do with the combobox filling the value in L54? I guess I see ISNUMBER and figure it doesn't apply to a text value!

And yet again - thank you so much! Shorter, faster formulas and code... now that's the ticket!

Cheers!
Gino
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Perfect! That works great! I guess I better learn more about ISNUMBER - it's not the first time that's tripped me up. Does it have to do with the combobox filling the value in L54? I guess I see ISNUMBER and figure it doesn't apply to a text value!

And yet again - thank you so much! Shorter, faster formulas and code... now that's the ticket!

Cheers!
Gino

You are welcome.


SEARCH returns either a position indicating integer (a hit) or a #VALUE! error ( a miss). ISMUNBER gives TRUE for a hit and FALSE for a miss.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top