Adding Each If Statement Together

MrNerd

New Member
Joined
Jan 9, 2018
Messages
36
Office Version
  1. 2003 or older
Platform
  1. Windows
I am doing a personal budget and wanted I40 and I41 to add together if the 25th of the month fell on a Saturday.

[TABLE="class: cms_table"]
<tbody>[TR]
[TH="align: center"][/TH]
[TH="align: center"]H[/TH]
[TH="align: center"]I[/TH]
[TH="align: center"]J[/TH]
[/TR]
[TR]
[TD="align: center"]40[/TD]
[TD]Car[/TD]
[TD="align: right"]$445[/TD]
[TD="align: center"]25[/TD]
[/TR]
[TR]
[TD="align: center"]41[/TD]
[TD]Groceries/Gas[/TD]
[TD="align: right"]$150[/TD]
[TD="align: center"]Saturday[/TD]
[/TR]
</tbody>[/TABLE]



Below you can see on the 25th of the month (Saturday) the $445 took (I27) but not adding in the $150 (below that is the formula held in I27). Not sure what I am missing.

[TABLE="class: cms_table"]
<tbody>[TR]
[TH="align: center"][/TH]
[TH="align: center"]G[/TH]
[TH="align: center"]H[/TH]
[TH="align: center"]I[/TH]
[TH="align: center"]J[/TH]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD]Money Out[/TD]
[TD]Money In[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]
[TD]Wednesday[/TD]
[TD="align: right"]$ -[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]
[TD]Thursday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"]3[/TD]
[TD]Friday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]4[/TD]
[TD]Saturday[/TD]
[TD="align: right"]$ 150[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"]5[/TD]
[TD]Sunday[/TD]
[TD="align: right"]$ -[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"]6[/TD]
[TD]Monday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]7[/TD]
[TD]Tuesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]8[/TD]
[TD]Wednesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]9[/TD]
[TD]Thursday[/TD]
[TD="align: right"]$ -[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: right"]10[/TD]
[TD]Friday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: right"]11[/TD]
[TD]Saturday[/TD]
[TD="align: right"]$ 150[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: right"]12[/TD]
[TD]Sunday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: right"]13[/TD]
[TD]Monday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: right"]14[/TD]
[TD]Tuesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: right"]15[/TD]
[TD]Wednesday[/TD]
[TD="align: right"]$ -[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]18[/TD]
[TD="align: right"]16[/TD]
[TD]Thursday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]19[/TD]
[TD="align: right"]17[/TD]
[TD]Friday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]20[/TD]
[TD="align: right"]18[/TD]
[TD]Saturday[/TD]
[TD="align: right"]$ 150[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]21[/TD]
[TD="align: right"]19[/TD]
[TD]Sunday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: right"]20[/TD]
[TD]Monday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]23[/TD]
[TD="align: right"]21[/TD]
[TD]Tuesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]24[/TD]
[TD="align: right"]22[/TD]
[TD]Wednesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]25[/TD]
[TD="align: right"]23[/TD]
[TD]Thursday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]26[/TD]
[TD="align: right"]24[/TD]
[TD]Friday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]27[/TD]
[TD="align: right"]25[/TD]
[TD]Saturday[/TD]
[TD="align: right"]$ 445[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]28[/TD]
[TD="align: right"]26[/TD]
[TD]Sunday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]29[/TD]
[TD="align: right"]27[/TD]
[TD]Monday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]30[/TD]
[TD="align: right"]28[/TD]
[TD]Tuesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]31[/TD]
[TD="align: right"]29[/TD]
[TD]Wednesday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]32[/TD]
[TD="align: right"]30[/TD]
[TD]Thursday[/TD]
[TD="align: right"]$ -[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]33[/TD]
[TD="align: right"]31[/TD]
[TD]Friday[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]34[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]35[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]36[/TD]
[TD="align: right"][/TD]
[TD]Expenses[/TD]
[TD="align: right"][/TD]
[TD]Day of the Month[/TD]
[/TR]
[TR]
[TD="align: center"]37[/TD]
[TD="align: right"][/TD]
[TD]Cell Phone[/TD]
[TD="align: right"]$0[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]38[/TD]
[TD="align: right"][/TD]
[TD]KCPL[/TD]
[TD="align: right"]$0[/TD]
[TD="align: center"]9[/TD]
[/TR]
[TR]
[TD="align: center"]39[/TD]
[TD="align: right"][/TD]
[TD]Mortgage/Insurance[/TD]
[TD="align: right"]$0[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD="align: center"]40[/TD]
[TD="align: right"][/TD]
[TD]Car[/TD]
[TD="align: right"]$445[/TD]
[TD="align: center"]25[/TD]
[/TR]
[TR]
[TD="align: center"]41[/TD]
[TD="align: right"][/TD]
[TD]Groceries/Gas[/TD]
[TD="align: right"]$150[/TD]
[TD="align: center"]Saturday[/TD]
[/TR]
</tbody>[/TABLE]

2018




[TABLE="class: cms_table"]
<tbody>[TR]
[TH="align: center"][/TH]
[TH="align: center"]I[/TH]
[/TR]
[TR]
[TD="align: center"]27[/TD]
[TD="align: right"]$ 445[/TD]
[/TR]
</tbody>[/TABLE]

2018

[TABLE="class: cms_table, width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="class: cms_table, width: 100%"]
<tbody>[TR]
[TH="align: center"]Cell[/TH]
[TH="align: center"]Formula[/TH]
[/TR]
[TR]
[TH="align: center"]I27[/TH]
[TD="align: left"]=IF(G27=$J$37,$I$37,IF(G27=$J$38,$I$38,IF(G27=$J$39,$I$39,IF(G27=$J$40,$I$40,IF(G27=$J$43,$I$43,IF(H27=$J$41,$I$41,IF(G27=$J$42,$I$42,"0")))))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Once an IF condtion becomes TRUE the rest of the formula doesnt get executed.
So if G27=J37 the result will be I37... and nothing else will get executed in that formula.

Here's a different way of doing it.
=(G27=J37)*I37+(G27=J38)*I38+(G27=J39)*I39+(G27=J40)*I40+(G27=J43)*I43+(H27=J41)*I41+(G27=J42)*I42

Each part in brackets evaluates to TRUE (1) or FALSE (0)
This is then muliplied by the value in column I, then the whole lot is added together.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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