Sum of Indirect array function

HanSolo3

New Member
Joined
Feb 15, 2018
Messages
2
I am new to arrays in excel and having a bit of trouble.

I have a worksheet "Raw Data" with a range which references the worksheet names in the workbook.

I want to sum up all the values from the worksheets which are listed in the Raw Data range.

I am using an array Indirect function and using Sum to sum up all the value. When I check calculate now... the indirect function is referencing all the values but the Sum function is just not adding them up and only returning the first value.


Right now the range is only BC3:BC4... I want it to be BC3:BC100+ but stop whenever a empty cell is encountered. Because this range is not fixed.

=SUM(INDIRECT(CONCATENATE("'", RIGHT('Raw Data'!BC3:BC4,5),"'!") & ADDRESS(ROW(),COLUMN())))
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I used N before the Indirect and it worked. I had same problem with match and saw someone using N and it fixed it.

Not sure what the N does but it worked.

Also, I added iferror so if the code goes to a blank it return 0. There must be a more efficient way to stop so it doesn't check everything.


here is the new code: =SUM(IFERROR((N((INDIRECT(CONCATENATE("'",RIGHT('Raw Data'!BC3:BC14,5),"'!")&ADDRESS(ROW(),COLUMN()))))),0))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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