sumproduct/VLOOKUP with countif?

smandy

New Member
Joined
Jun 23, 2013
Messages
4
I am trying to do a count by text criteria for a particular date. The formula that that is currently in the spreadsheet is time consuming and user unfriendly and needs to have the range adjusted daily:

=COUNTIF('Data-All-2012-13'!$G$2886:$G$2906,"NTH")



DateNTHSTHWEST
20/6/2013Formula here totalling # of NTH for 20/6/2013
21/6/2013Formula here totalling # of NTH for 21/6/2013

<TBODY>
</TBODY>


'Data-All-2012-13' is the sheet being referenced:
DateGroup
20/6/2013NTH
20/6/2013STH
20/6/2013NTH

<TBODY>
</TBODY>


Neither of the 2 formulas below have worked:

=SUMPRODUCT(--('Data-All-2012-13'!$G$4:$G$3000=DATE(21,6,2013)),--('Data-All-2012-13'!$G$4:$G$3000=NTH"))

{=SUM(('Data-All-2012-13'!$D$4:$D$4002=$A312)*('Data-All-2012-13'!$G$4:$G$4002=B$4))}

any help would me muchly appreciated!
Thanks :)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi

Are your dates actual discrete date values - they are not, for example, date & time (so non-whole numbers) or they are not text values instead of dates?

Regarding your SUMPRODUCT, DATE takes its arguments as Y,M,D so you look like you have them round the wrong way.
 
Upvote 0
Thanks for your reply, the dates are Australian, so 20/6/2013 is the correct way. With the SUMPRODUCT I experimented and it didnt work either way. Would it be in the date formatting? ie 2-Jun-13
 
Upvote 0
Did you apply the correct sequence of arguments to DATE() as I intimated? That would result in:

=SUMPRODUCT(--('Data-All-2012-13'!$G$4:$G$3000=DATE(2013,6,21)),--('Data-All-2012-13'!$G$4:$G$3000=NTH"))
 
Upvote 0
Thanks for your reply, the dates are Australian, so 20/6/2013 is the correct way. With the SUMPRODUCT I experimented and it didnt work either way. Would it be in the date formatting? ie 2-Jun-13

Hi smandy

Excel doesn't care about your formatting for the calculation. Formatting is for you, as a human, to make it pretty or easy to read.

So the question is: is it an excel date value (a number) or is it a text value?

You can test it using for ex.

=ISNUMBER(A1) where A1 would be the cell with the date.

This will help to understand the problem
 
Upvote 0
Thanks so much, I got the formula :

=SUMPRODUCT(--('Data-All-2012-13'!$D$4:$D$3000=DATE(2013,6,21)),--('Data-All-2012-13'!$G$4:$G$3000=NTH"))

to work, it was throwing back #NA due to the VLOOKUP in the range being accessed, I solved that with the iserror formula and viola!!

Thanks heaps for the input, much appreciated :)
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,822
Members
449,096
Latest member
Erald

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