Summing data based on date range

I’m on Numbers for iPad.


Ive created a file to assist my boyfriend with Christmas bookings info at his restaurant.


theres 2 sheets and a form.


first is a summary sheet showing total early bird bookings and total other bookings. This sums from the raw data sheet.


I’ve then done a total of the number of guests booked in versus his target to show a shortfall or otherwise.


all good.


however he also has a target for early bird bookings and I’m struggling here.


so what I’m trying to do is as follows:-


on Summary sheet, off peak target - total guests I want to sum up from the Raw Data sheet the No of guests but only when the Date of Booking is from 11/11/25 to 30/11/25


ive tried doing one from 11/11/25 onwards alone without restricting the end date but I can’t even get that to work at the moment.



SUMIFS(No of Guests,Raw Data::Table 1::A,">=" &Raw Data::Table 1::A,DATE(2025,11,10))


if anyone can help I’d be eternally grateful.



[Edited by Moderator]

iPad Pro

Posted on Aug 30, 2025 02:14 AM

Reply
6 replies

Aug 30, 2025 06:17 AM in response to ffcphone

SUMIFS(Raw Data::Table 1::G,Raw Data::Table 1::A,">="&DATE(2025,11,11),Raw Data::Table 1::A,"<="&DATE(2025,11,30))


When you copy/paste this formula the first reference will convert to "No of Guests". I don't use the Numbers setting "Use header names as labels", one reason being that you often get a mix of regular cell references and others that have names and it is a little confusing.

Aug 30, 2025 07:22 AM in response to ffcphone

On the iPad, where header names are always labels, your formula could look like this:




Or, perhaps easier, you could just let a Pivot Table do the work. No formulas! Just a few clicks.


Add an 'Early' column to the data table:


For convenient entry on the iPad this could be formatted as Pop-Up Menu something like this:




Tap in the data table, then tap Cell > Create Pivot Table > Pivot Options and do something like this:




You can do a lot more than sums with Pivot Tables. And you can have multiple Pivot Tables based on the same data table, to give you different summary statistics.


When you update/add data just choose Cell > Refresh Pivot Table.


SG

Aug 31, 2025 03:01 AM in response to Badunit

Thank you so much for this. I had all the right code etc just couldn’t get the syntax right.


This now doesn’t error but so far it’s not adding up either weirdly. I added a new row to the data table which was an early bird but the total remained 0 on the summary page. I’ll need to look into it further.


But your help has been very much appreciated.

Aug 31, 2025 10:21 AM in response to ffcphone

The table in your first screenshot has 7 rows of data but none of the dates meet the criteria so the result should have been 0 for the table you posted. I can't say why a new row which has a date in the correct range and a non-zero number of guests would still sum to 0. One possibility is an error in the formula when you retyped (?) it into your table There are some other possibilities, too, but none really stand out:


SUM, SUMIF, and other numeric functions may result in 0 or an incorrect result is if the cells/ranges being summed have text-formatted numbers in them. Your numbers are aligned to the right of the cell like actual numbers (text naturally aligns to the left, numbers to the right) so this probably is not the problem here. Another could be the dates in column A have the year 0025, not 2025. That is also unlikely because Numbers will interpret a typed-in 2-digit date of 00 through 49 as 2000 through 2049 (50-99 will become 1950 through 1999).

Summing data based on date range

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.