How to do without using INDIRECT?

obiron

Active Member
Joined
Jan 22, 2010
Messages
469
Hi guys, I have a cell (lets call is $D$32) which holds an integer (n).

in cell $D$33 I want to put the sum of row 14 for n columns to the right of column D.

E.g.
If $D$32 = 3 then I want to SUM(E$14:$G$14)
if $D$32 = 6 then I want to SUM($E$14:$J$14)

I am currently using INDIRECT and OFFSET which is A) ugly and B) volatile

Code:
= SUM(E14:INDIRECT(CELL("address",OFFSET(E14,0,D32-1,1,1))))

There are 52 of these calculations on the worksheet and I need to update the values up to 30,000 times so avoiding volatile calculations would be nice. Can you think of another way of doing it without using VBA?

TIA

Obiron
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try:

=SUM(E14:INDEX(14:14,,$D$32+4))
 
Upvote 0
Genius!

slight modification
Code:
=SUM(E14:INDEX(14:14,,D32+COLUMN(D32)))

This way when you copy the formula across the row the D32 and column(D32) updates to the reference cell and returns the column number
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,681
Members
452,937
Latest member
Bhg1984

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