Designate # of columns to sum

m24jones

Board Regular
Joined
May 19, 2002
Messages
61
Is there a way I could designate the number of columns to sum? So If I put a 4 in a cell then my formula below would grab A3 and the 3 columns to the right?

For example, on one tab I have a basic set of data by month:

Column: A B C
Month: Jan Feb Mar
Data: 51 34 96

On a different tab I would like to sum the data, but use a # to designate the number of columns to sum including January instead of changing the formula manually.

Thanks in advance for any help...
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
=SUM(OFFSET(A3,0,0,,4))
(the 4 could be linked to a particular cell, rather than within the formula)
 
Upvote 0
Maybe like this with column letter rather than number

Excel Workbook
ABCD
1JanFebMarB
251349685
Sheet2
 
Upvote 0
Is there a way I could designate the number of columns to sum? So If I put a 4 in a cell then my formula below would grab A3 and the 3 columns to the right?

For example, on one tab I have a basic set of data by month:

Column: A B C
Month: Jan Feb Mar
Data: 51 34 96

On a different tab I would like to sum the data, but use a # to designate the number of columns to sum including January instead of changing the formula manually.

Thanks in advance for any help...
One way...

=SUM(A3:INDEX(A3:Z3,A1))

Where A1 = the number of coulmns to be summed.

Note that if A1 is an empty cell the formula will calculate the entire range.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

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