SUMIFS function with wildcard for dates

Sheet 1 has raw data from my bank statement. In sheet 2 I'm creating a table showing total incoming and outgoing funds per month. So, I'll have rows in sheet 1 with a transaction date ranging from 01/04/2020 to 30/04/2020 ((UK format). Here's the formula.


SUMIFS('Statement - 2020'::Table 1::Debit Amount,'Statement - 2019'::Table 1::Transaction Date,"=???04????")


This doesn't work. I'm new to wildcards in formulas but my undersanding is that a ? stands for a character and so I can use this to determine the 4th and 5th characters. I don't really want to have to split the date out into days, months and years columns. I used to do this and it's an extra step that feels inefficient. Any help gratefully received.

MacBook Pro 15", OS X 10.11

Posted on May 20, 2020 6:34 AM

Reply
10 replies

May 21, 2020 5:41 AM in response to zoooj

I think what you want to do can be done with wildcards if you add a new column to your table (which you can hide later). The wildcards work on text but not dates so add a column that converts the dates into text and use it for the SUMIF test.


If your dates are in column A, the formula would be a simple =A&""

Put it in every row so that, if/when you add new rows, it automatically populates in the new rows.


The downfall of using text vs using actual dates (including inside the SUMIF, either referenced from a cell or created with the DATE function) is that it will fail if the user's date system is not set the same as yours. Using actual dates is a more robust solution.

May 21, 2020 6:30 AM in response to zoooj

Hi zoooj,


I understand your reluctance to use extra columns to split a date into days, months and years. Here is a method that uses one extra column ("Month") that you can hide when all is working well.


Formula in Table 1 B2 =MONTHNAME(MONTH(A2))

Fill down.


In the Summary by Month table, format column A as Text and type January into A2. Fill down.


Formula in B2 =SUMIF(Table 1::B,A2,Table 1::D)

Fill down.


Sorry about the zero balance. These were made-up values.😉


Regards,

Ian.

May 20, 2020 12:33 PM in response to zoooj

Hmmmm…

Correct link? I got this message on clicking it.

The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly.

Please visit the main page of Apple Support Communities for links to discussion areas.


Regarding: "I'll see if I can work out how to submit a feature request now!"


Numbers menu > Provide Numbers Feedback, then choose Feature request from the menu provided.


Regards,

Barry

May 21, 2020 7:19 AM in response to zoooj

zoooj wrote:

total incoming and outgoing funds per month.


If you're looking for a quick, simple, and flexible approach you might want to consider Categories (a.k.a. Smart Categories).


Let's say you have downloaded raw data something like this:



Click in the Date column, and from the menu choose Organize > Add Category for "Date". That will give you something like this:



Click a shaded cell in the Incoming column, then the "gear" symbol that appears next to it, and choose "Subtotal." Repeat in the Outgoing column. That gives you something like this:


Collapse rows if desired to hide detail.


Turn off Categories in the right panel when you want to see the whole table again.


This is all very fast and easy. Just a few clicks. No formulas to enter.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SUMIFS function with wildcard for dates

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