relative reference in an array formula that refers to a table

TVTony

New Member
Joined
Jul 3, 2017
Messages
3
I'm sure someone else must have run into this issue before me, but so far I can't find the answer.

So here's my problem. I've got an array formula that includes a reference to a table:
Code:
=SUM(IF(MyTable[[#All],[Column72]:[Column72]]=Sheet2!$A2,MyTable[[#All],[Column10]]))
If I put this in cell A1, use SHIFT+CTRL+ENTER, then drag it across B1, C1, etc, I'd like the reference in B1 to become [Column11], in C1 to be [Column12], and so on. Instead, it stays [Column10], ie, an absolute reference.

This seems to be an array formula issue. If I just hit ENTER instead of SHIFT+CTRL+ENTER, then the reference is relative and I get [Column 11] etc. But that's not much use to me since this needs to be an array formula.

I've found resources like https://www.excelcampus.com/tips/absolute-formula-references-excel-structured-table/ but it doesn't seem to address my issue, because it discusses relative/absolute references to tables in 'standard' (non-array) formulas only.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
PS, maybe I shouldn't have quoted my formula with
Code:
; obviously it's not meant to be VBA.
 
Upvote 0
Oh, and before someone asks (quite sensibly) why I don't simply use a SUMIF formula rather than an array formula, it's because what I really want to do is this:

=SUM(IF(MyTable[[#All],[Column72]:[Column72]]=Sheet2!$A2,MyTable[[#All],[Column10]:[Column12]]))

...that is, sum a multi-column/multi-row range. You can do that with SUM, but apparently not with SUMIF or SUMIFS...hence the need for the array formula. Sorry I didn't make that clear in the original post.
 
Upvote 0
Try A1: {=SUM(IF(MyTable[Column72]=Sheet2!$A$2,OFFSET(MyTable,,MATCH("Column10",MyTable[#Headers],)+3*COLUMNS($A1:A1)-4,,3)))}

This assumes Column10:Column12 is contiguous, and that you want B1 to sum adjoining columns Column13:Column15 (?)

You can adjust the COLUMNS() reference to suit, e.g. if B1 should be sum of Column11:Column13, change

3*COLUMNS($A1:A1)-4
to COLUMNS($A1:A1)-2
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top