Sum varible range

stapuff

Well-known Member
Joined
Feb 19, 2004
Messages
1,126
I have the following:

A2 = 10
B2 = 10
C2 = 10
D2 = 10
E2 = 10

F2 is =sum(A2:E2) result is 50.

If I insert another column between E & F. The formula moves over and stay's the same range.

I am looking for a formula that sum's the 5 columns to the left of the cell with the formula even if a new column is added. G2 would now contain =sum(B2:F2)

Thanks Kurt
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I have always included a blank column in the past, but you made me think.
try this, it worked for me.
I put this in F2
=SUM(A2:OFFSET(F2,0,-1))
 
Upvote 0
Aladin -

Your 2nd formula was exactly what I needed.

Again - Outstanding!

Thanks,

Kurt
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,802
Members
449,095
Latest member
m_smith_solihull

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