• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Increase/Drecrease Column by Number in CELL A2

koskesh

Member
Hello,

I am using a workbook to track weekly sales vs the forecast
It starts by weeks 36 of this year and ends week 10.2015

AIM:
CELL A2: (value changes every week) For example 2

SUM(H12:L12) -> add 2 columns =SUM(H12:N12)

and another formula to decrease the columns
for example
SUM(L12:Z12) to SUM(N12:Z12) decrease the first part of the sums by 2 columns

Hope this clears it up
Thanks for the help
 
Hi Koskesh,

I think there is some typo or error in your formula in index part.

If you have not found any other alternate, here is what I figured out:

first requirement:
=SUM(INDIRECT(CONCATENATE(ADDRESS(ROW(H12),COLUMN(H12)),":",CHAR((78)+A2),ROW(H12))))

second requirement:
=SUM(INDIRECT(CONCATENATE(CHAR((76)+A2),ROW(H12),":",ADDRESS(ROW(Z12),COLUMN(Z12)),)))

Note:
Char(78) return L, while char(76) returns L. And it adds the number of columns specified in A2. One can directly give the "H12", but i used the address just to keep it more consistent.

Regards,
Prasad DN
 
Back
Top