I've seen similar threads out there for this topic, but I can't seem to find the answer to my problem.
I have the following list of data on a worksheet that will be regularly added onto:
Monthly Info
A B C D
1 Date Country CustomerName FlightType
2 Jan-14 Spain JohnDoe Domestic
3 Jan-14 France JohnDoe International
4 Feb-14 Italy JohnDoe International
5 Feb-14 Italy JohnDoe Domestic
I have a second worksheet- Data Count- that I want to automatically count data from the above sheet as I enter it.
Data Count
A B C D E F G H I
1 Blank Jan-14 Jan-14 Feb-14 Feb-14 Mar-14 Mar-14 Apr-14 Apr-14
2 Blank Domestic International Domestic International Domestic International Domestic International
3 France
4 Italy
5 Spain
This second sheet needs to tally the flight by country, month, and flight type (domestic/international)- so there are 3 commands that need to be fulfilled.
I'm able to count the number of flights by month and flight type by using a SUMIF array formula- here is what an example of the formula I've been using for Jan 2014 Domestic flights count:
=SUM(IF('Monthly Info!A1:A5='Data Count'!B1,1,0),IF('Monthly Info'!A1:A5='Data count'!B2,1,0))
However I can't seem to add to this function to include the country as I keep getting an error result. I think there might be an issue because this involves a horizontal lookup as opposed to vertical lookup?? Do I need to use a different type of function- SUMPRODUCT or something else??
Thanks for any input! I've been researching for hours!!
Bookmarks