Overcome Nested IF statements

Jag Lau

New Member
Joined
Sep 9, 2015
Messages
15
I have a table as follow on fees and wanted to use the nested IFs to find the accumulated fees depending on which month it is.

ABCDEFGHIJKLM
JanFebMarAprMayJunJulAugSepOctNovDec
Fees640500800500650420410550220440160180

<tbody>
</tbody>

=IF(MONTH(TODAY())=1,B2,IF(MONTH(TODAY())=2,sum(B2:C2),IF(MONTH(TODAY())=3,sum(B2:D2).....

Thats my formula, but because there is a limitation, I cannot test more than 7.

I tried Concatenate formula, but it stopped at the first one.
=CONCATENATE(IF(MONTH(TODAY())=1,B2,""), IF(MONTH(TODAY())=2,sum(B2:C2),""),IF(MONTH(TODAY())=3,sum(B2:D2),"")...

Anyone can help me???
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I have a table as follow on fees and wanted to use the nested IFs to find the accumulated fees depending on which month it is.

ABCDEFGHIJKLM
JanFebMarAprMayJunJulAugSepOctNovDec
Fees640500800500650420410550220440160180

<tbody>
</tbody>

=IF(MONTH(TODAY())=1,B2,IF(MONTH(TODAY())=2,sum(B2:C2),IF(MONTH(TODAY())=3,sum(B2:D2).....

Thats my formula, but because there is a limitation, I cannot test more than 7.

I tried Concatenate formula, but it stopped at the first one.
=CONCATENATE(IF(MONTH(TODAY())=1,B2,""), IF(MONTH(TODAY())=2,sum(B2:C2),""),IF(MONTH(TODAY())=3,sum(B2:D2),"")...

Anyone can help me???

=SUM(OFFSET($A$2,0,1,1,MATCH(TEXT(TODAY(),"mmm"),$B$1:$M$1,0)))
 
Upvote 0

A
B
C
D
E
F
G
H
I
J
K
L
M
1
JanFebMarAprMayJunJulAugSepOctNovDec
2
Fees
640​
500​
800​
500​
650​
420​
410​
550​
220​
440​
160​
180​
3
4
5
4470​
tot fees until august

<tbody>
</tbody>


b5=SUMPRODUCT((MONTH(B1:M1&1)<=MONTH(TODAY()))*(B2:M2))
 
Upvote 0
this work for evrey month that you choose for example april

b5=SUMPRODUCT((MONTH(B1:M1&1)<=MONTH(E1&1))*(B2:M2))
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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