Numbers SUMIFS multiple conditions different sheet

ENVIRONMENT:

Number 10.1 on MacOS 10.15.5 (Catalina)

ISSUE:

I've looked at, and tried to follow, the solutions provided in both:


But somehow I'm getting something wrong and not seeing it.

I have two sheets (or even two tables on one sheet) - the first contains the detailed information:

The second is for yearly summary by key:


The formula in B2 that has a syntax error is:


The formula in B3 that has a syntax error is:


I'm sure, like many things, there's some seemingly small syntactic thing I did wrong - but I can't see it - and am hoping someone here can point it out for me.


Also - I noticed when I copy/pasted the formulas into column C or row 4 that the formula didn't update its cell references - I'm hoping that's because of the syntax error and that once fixed they'll update correctly; but if I'm wrong - please feel free to point out how to correct that too.


Thanks in advance.


Posted on Aug 3, 2020 12:18 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 3, 2020 8:20 PM

Hi astoller,


Your first assumption is correct—and it's a small enough error that several people occasionally get it wrong it.

The comparison operator in each item,condition pair is assumed to be =. If that is true, there is no need to include the operator.


But correcting the syntax error doesn't get us out of the woods…

The culprit here is YEAR(DETAIL::A), which extracts the YEAR from a single DATE & Time value. Add a column (which may be hidden) to Detail in which you extract the year value for each row, then use that new column in place of DETAIL::A:




Formula in DETAIL::D2:               YEAR(A2)

Formula in Year Summary::B2:   SUMIFS(Detail::$C,Detail::$B,$A2,Detail::$D,B$1)



Filling the formula to other cells:


Select, Copy, Expand selection, Paste is efficient to quickly fill the dozen body cells with the formula in B2 of Year Summary:


  • Select (one click) cell B2
  • Copy
  • Shift-click on D4 to expand the selection to cells B2:D4
  • Paste

Regards,

Barry

Similar questions

3 replies
Question marked as Top-ranking reply

Aug 3, 2020 8:20 PM in response to astoller

Hi astoller,


Your first assumption is correct—and it's a small enough error that several people occasionally get it wrong it.

The comparison operator in each item,condition pair is assumed to be =. If that is true, there is no need to include the operator.


But correcting the syntax error doesn't get us out of the woods…

The culprit here is YEAR(DETAIL::A), which extracts the YEAR from a single DATE & Time value. Add a column (which may be hidden) to Detail in which you extract the year value for each row, then use that new column in place of DETAIL::A:




Formula in DETAIL::D2:               YEAR(A2)

Formula in Year Summary::B2:   SUMIFS(Detail::$C,Detail::$B,$A2,Detail::$D,B$1)



Filling the formula to other cells:


Select, Copy, Expand selection, Paste is efficient to quickly fill the dozen body cells with the formula in B2 of Year Summary:


  • Select (one click) cell B2
  • Copy
  • Shift-click on D4 to expand the selection to cells B2:D4
  • Paste

Regards,

Barry

Aug 5, 2020 12:55 AM in response to astoller

"My resulting formula looks a little different because it uses column headings rather than letters"


Using the column headers as labels is fine for the individual or group using the document. I prefer using cell addresses when analyzing documents that I've not been the author of because column B is always the second column in the table, saving me the time of searching for the column whose header label is "Amount", which could be anywhere on the table. Usinc cell addresses also removes the possibility of spelling errors tossing a spanner into the works.


Regards,

Barry

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.

Numbers SUMIFS multiple conditions different sheet

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