close

I have a simple budget with columns for each month (month 1 to 12) and a
Year to Date column at the end.

If it is now say month 3, how do I get my YTD column to just add up the
first three columns. I have a cell that tells me what month we are in,
so I can use this in the formula, but I cant think of how to write the
formula that adds up this specified number of columns.

I want somthing that says it is now month 'x', so add up months 1 to
'x'. Each time I put in the month number, I want to see the YTD sum
without changing that formula.

Any help will be appreciated.

Regards, AB--
Ainsley
------------------------------------------------------------------------
Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
View this thread: www.excelforum.com/showthread...hreadid=539848You can use indirect for achieving this. Suppose that we have the month data
in column B (B1:B12), and the cell where you want to enter the moving month
is C1. You can enter this formula is C2, for example:
=quot;B1:Bquot; amp; C1
And then in B13 (or wherever fits)
=SUM(INDIRECT(C2))

Hope this helps,
Miguel.

quot;Ainsleyquot; wrote:

gt;
gt; I have a simple budget with columns for each month (month 1 to 12) and a
gt; Year to Date column at the end.
gt;
gt; If it is now say month 3, how do I get my YTD column to just add up the
gt; first three columns. I have a cell that tells me what month we are in,
gt; so I can use this in the formula, but I cant think of how to write the
gt; formula that adds up this specified number of columns.
gt;
gt; I want somthing that says it is now month 'x', so add up months 1 to
gt; 'x'. Each time I put in the month number, I want to see the YTD sum
gt; without changing that formula.
gt;
gt; Any help will be appreciated.
gt;
gt; Regards, AB
gt;
gt;
gt; --
gt; Ainsley
gt; ------------------------------------------------------------------------
gt; Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
gt; View this thread: www.excelforum.com/showthread...hreadid=539848
gt;
gt;


Hi, Im not sure I understand.

I have in Column A Jan data, Column B Feb data and so on to Dec in
Column L. The a Column M which is to be the sum of several of these
months, depending upon a number in a seperate cell. This being the
month number we are in.

Jan being month 1, Feb being month 2 and so on to Dec being month 12.

So if it is currently month 5, I want my Year to Date Column to sum
columns Jan to May simply by me inputting a 5 in a cell say above my
YTD column.

What formula do I use to achive this ?--
Ainsley
------------------------------------------------------------------------
Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
View this thread: www.excelforum.com/showthread...hreadid=539848Hi,

I have made the assumtion that the data was in rows, not in columns.
The idea behind the formula is craft dinamically a range name (for example
A2:E2) and then sum the data on this range. We use INDIRECT to achieve this.
In this case, if you have the cell where you want to enter the month in P1,
the formula to use in the M column can be:
=SUM(INDIRECT(quot;Aquot;amp; ROW(A2) amp; quot;:quot; amp;ADDRESS(ROW(A2),$P$1)))
This is for cell M2, you can copy this formula over the column.

Hope this helps,
Miguel.

quot;Ainsleyquot; wrote:

gt;
gt; Hi, Im not sure I understand.
gt;
gt; I have in Column A Jan data, Column B Feb data and so on to Dec in
gt; Column L. The a Column M which is to be the sum of several of these
gt; months, depending upon a number in a seperate cell. This being the
gt; month number we are in.
gt;
gt; Jan being month 1, Feb being month 2 and so on to Dec being month 12.
gt;
gt; So if it is currently month 5, I want my Year to Date Column to sum
gt; columns Jan to May simply by me inputting a 5 in a cell say above my
gt; YTD column.
gt;
gt; What formula do I use to achive this ?
gt;
gt;
gt; --
gt; Ainsley
gt; ------------------------------------------------------------------------
gt; Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
gt; View this thread: www.excelforum.com/showthread...hreadid=539848
gt;
gt;


Hi, thanks for that. Ive used it but cant get it to work exactly all
situations.

If my data starts in Column E (for Jan) and ends in Column P (Dec) and
the YTD is in Column T and the month number in Column V I cant seem to
make the formula work. The data all starts on row 11.

I also cant seem to copy it to other rows downward.

Ive typed
=SUM(INDIRECT(quot;Equot;amp; ROW(E11) amp; quot;:quot; amp;ADDRESS(ROW(E11),$V$11)))

But its not working. What am i doing wrong ?--
Ainsley
------------------------------------------------------------------------
Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
View this thread: www.excelforum.com/showthread...hreadid=539848=SUM(OFFSET(E11,,,1,V11))

HTH
--
AP

quot;Ainsleyquot; gt; a écrit
dans le message de news:
...
gt;
gt; Hi, thanks for that. Ive used it but cant get it to work exactly all
gt; situations.
gt;
gt; If my data starts in Column E (for Jan) and ends in Column P (Dec) and
gt; the YTD is in Column T and the month number in Column V I cant seem to
gt; make the formula work. The data all starts on row 11.
gt;
gt; I also cant seem to copy it to other rows downward.
gt;
gt; Ive typed
gt; =SUM(INDIRECT(quot;Equot;amp; ROW(E11) amp; quot;:quot; amp;ADDRESS(ROW(E11),$V$11)))
gt;
gt; But its not working. What am i doing wrong ?
gt;
gt;
gt; --
gt; Ainsley
gt; ------------------------------------------------------------------------
gt; Ainsley's Profile:
gt; www.excelforum.com/member.php...oamp;userid=31960
gt; View this thread: www.excelforum.com/showthread...hreadid=539848
gt;

Fantastic, sweet and simple.

Cheers--
Ainsley
------------------------------------------------------------------------
Ainsley's Profile: www.excelforum.com/member.php...oamp;userid=31960
View this thread: www.excelforum.com/showthread...hreadid=539848

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()