simplest way to find a cell value based on two or more text criteria?

hannahmc8

New Member
Joined
Jun 27, 2011
Messages
17
Hi,
What is the best way to find a cell value based upon two text based criteria?
This is a simplified version of my table which has a week's worth of dates, 10 tills and multiple cash items per till.
-------A--------B--------C-----------D-----------E------------------F----------
--1---TILL----DATE----CASH--FIND TILL---FIND DATE---RETURN ANSWER
--2----X-------1/JAN----£5
--3----Y-------1/JAN----£10
--4----Y-------1/JAN----£10
--5----Y-------2/JAN----£20
--6----Z-------no value--no value
I want to find the cash per till per date e.g
Info needed 1. On the 1st January Till x returned £5
Info needed 2. On the 1st January Till y returned £20 (£10+£10)
Info needed 3. On the 1st January the total of all tills returned £25 (£5+£10+£10)
I have used an INDEX and MATCH array which finds one match but does not sum multiples...
Many many thanks
Hannah
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Edit timed out :-(

Use this to exclude "No Value":

=SUMPRODUCT(--($D$2=$B$2:$B$6),--($E$2=$A$2:$A$6),--($C$2:$C$6<>"No Value"),$C$2:$C$6)
 
Upvote 0
I have both working thank you - the D cell was referring to the B column not the A column and vice versa!
Could you explain what the function of the -- are in the formula?
Intrigued and trying very hard to learn!
Hannah
 
Upvote 0
James you are being a star.
I have transferred the formula to the table I am using and am now frustratingly getting the VALUE warning. Each of the column references contain empty cells which are necessary for further data entry.....
Thank you for your time
Hannah
 
Upvote 0
Hi Hannah,

It shouldn't matter about empty cells.

I am using this as a test:

=SUMPRODUCT(--($A$2:$A$100=$D$2),--($B$2:$B$100=$E$2),$C$2:$C$100)

Where:

A2:A100 is your list of till names.
B2:B100 is your list of dates.
C2:C100 is your list of cash income.
D2 is the Till lookup value.
E2 is the date lookup value.

I have blanks, data and "No Value" in random cells but it is still calculating the correct result.

Can you paste the formula exactly?
 
Upvote 0
=SUMPRODUCT(--($C$9=$H$20:$H$23),($C$11=$C$20:$C$23)*($K$20:$K$23))

this is the actual formula. All of the cells in row 23 are blank and are giving a VALUE error, but if i change the 23 to 22 where each cell in the row has a value it works
I may throw my mac out of the window!
 
Upvote 0
Try changing it to:

=SUMPRODUCT(--($C$9=$H$20:$H$23),--($C$11=$C$20:$C$23),$K$20:$K$23)
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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