You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Sums by month from array

I am trying to have the small table on the right autofill the values in column B to the corresponding month from the large table on the left. I have run into a snag with the date component. My original intention was to use the small table as a two week budgeting tool, from payday to payday, but I cannot seem to get the formulas correct. I have included what I have been able to piece together so far. Any assistance would be amazing. I know I may be heading down the wrong path with formula that I started with, but I have not been able to find a path to a solution. This was just the latest attempt. TYIA

MacBook Air 13″, macOS 15.0

Posted on Aug 29, 2024 1:11 AM

Reply
3 replies

Aug 29, 2024 12:19 PM in response to cdwilshusen

This seems to be a prime use case for a pivot table - taking two dimensional data and categorizing it... but in either case, from your description, it seems like there are a couple of other options.


The best option is going to depend on some data I just don't have - namely how you expect to use it.

From your screenshots, I'm guessing that you want to change the month name in cell A1 on the 'Bi-Weekly Worksheet' and have it extract the relevant data. Is that right?


If so, I'd take an INDIRECT() approach with a couple of LOOKUP()s


First, you can use LOOKUP() to find a cell value (e.g. the month) in a range of other cells (e.g. the header of the expenses table). Once you have that you can extract the ROW() or COLUMN() number that you can use to craft a reference to the cell you're after. I did this by setting cell B2 on the Bi-Weekly worksheet to:



Here I basically LOOKUP() cell A2's value in column A of the expenses table, and then extract its ROW() number.

I then LOOKUP() the current month from cell A1 in the header row of expenses, and extract its COLUMN() number.


Now I concatenate these into a string, embedding the table name, and 'R' and 'C' values to end up with something like: "2024 Yearly Expenses - Actual::R4C11".

This string is something that can be passed into INDIRECT() to convert to a cell reference and go grab its value.


Fill this formula down the column for however many expenses you expect to track.



Now as you change the month in cell A1, the cell values will update to find the current (column A) expense in the given month ($A$1)


There are other ways of solving this, and my interpretation may be off, so feel free to post back if you need more.

Sums by month from array

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