close

Hi , I have been trying to find a solution for this one for quite some time
now.

Basically, I need to create a formula that automatically adjusts what cells
it sums up depending on what month you enter in to a specific cell.

So if A1=January , then my target cell equal, lets say sum(j6:j6)
while if A1 changes to A1 = February, then my target cell sums up (j6:k6)
(adds one cell to the right)
where J5 and K5 are the list of months.

I think it might be a combination of vlookup and maybe some if functions,
appreciate anyones help if you can crack it for me.

This assumes that A1 contains a date.

=sum(offset(j6,0,0,month(A1),1))

If A1 contains JUST a month name, then

=sum(offset(j6,0,0,month(datevalue(a1amp;quot;1, 2006quot;)),1))
quot;Gibraltar13quot; wrote:

gt; Hi , I have been trying to find a solution for this one for quite some time
gt; now.
gt;
gt; Basically, I need to create a formula that automatically adjusts what cells
gt; it sums up depending on what month you enter in to a specific cell.
gt;
gt; So if A1=January , then my target cell equal, lets say sum(j6:j6)
gt; while if A1 changes to A1 = February, then my target cell sums up (j6:k6)
gt; (adds one cell to the right)
gt; where J5 and K5 are the list of months.
gt;
gt; I think it might be a combination of vlookup and maybe some if functions,
gt; appreciate anyones help if you can crack it for me.

Target cell formula:
=SUM(OFFSET(J6,,,,MATCH(A1,J5:U5,0)))

HTH
--
APquot;Gibraltar13quot; gt; a écrit dans le
message de ...
gt; Hi , I have been trying to find a solution for this one for quite some
time
gt; now.
gt;
gt; Basically, I need to create a formula that automatically adjusts what
cells
gt; it sums up depending on what month you enter in to a specific cell.
gt;
gt; So if A1=January , then my target cell equal, lets say sum(j6:j6)
gt; while if A1 changes to A1 = February, then my target cell sums up (j6:k6)
gt; (adds one cell to the right)
gt; where J5 and K5 are the list of months.
gt;
gt; I think it might be a combination of vlookup and maybe some if functions,
gt; appreciate anyones help if you can crack it for me.

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

software

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