Sum variable number of columns

trock12

New Member
Joined
Dec 17, 2014
Messages
29
I've tried a few things and nothing seems to work.

Let's say A1 = a number input by a user.

What I want to put in cell B1 is, sum the number of columns from left to right starting in column C1 based on the number in A1.

This formula would be row based - so it would only sum C1:F1 if A1 was 4 for instance.
 

Some videos you may like

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

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,837
Hi

Try in B1:

=SUM(OFFSET(C1,,,,A1))
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,108,969
Messages
5,525,961
Members
409,673
Latest member
Riseee

This Week's Hot Topics

Top