Need to write a SUM with IF and AND functions. PLEASE HELP!

calico2002

New Member
Joined
Mar 13, 2016
Messages
3
I need help writing a formula. I am trying to make some budgeting sheets in Excel. I have one sheet with a table called MonthlyExpenses, with columns for Date, Categories (includes a drop down list with specific options), and Actual Cost. On another sheet I have a summary sheet which compares monthly estimates with monthly actuals. There is a row for each category (matches the categories in the MonthlyExpenses table). I need a formula that will calculate the actual cost, in each category, for each month. I'm sure it's possible, I'm just not experience enough to get there. To summarize I need a formula with these components (I used examples)

Category=OTEC
If date>=Jan. 1, 2016 AND <=Jan.31,2016
Sum of Actual Cost

Anyone have any ideas on how to put that together? I would really appreciate your help.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
=sumifs( range to sum of actual costs , range of catergory, "OTEC", range of date , ">=Jan. 1, 2016" , range of date, "<=Jan. 31, 2016")

we can replace the OTEC for the cell with the dropdowns and also change the dates for cells with the range you want to report from

But would need to know the actual ranges of the cells concerned

 
Upvote 0
Ok, so I put in this formula

=SUMIFS(MonthlyExpenses[Actual Cost],MonthlyExpenses[Category],"OTEC", MonthlyExpenses[Date],">=Jan. 1, 2016", MonthlyExpenses[Date],"<=Jan. 31, 2016")

When I pulled the cell ranges, it automatically to the table name [column name], so I assumed that is ok. It accepted the formula, but it's not quite right. On my test data, it should be $1000, and it was giving me 0. Can you find the error?

Thanks for the help, I really have no clue what I'm doing, I just know it's something excel can do.

=sumifs( range to sum of actual costs , range of catergory, "OTEC", range of date , ">=Jan. 1, 2016" , range of date, "<=Jan. 31, 2016")

we can replace the OTEC for the cell with the dropdowns and also change the dates for cells with the range you want to report from

But would need to know the actual ranges of the cells concerned

 
Upvote 0
it may not be picking up the date correctly
are the
MonthlyExpenses[Date]
actually dates

try putting
Jan. 1, 2016 and Jan. 31, 2016 into a couple of cells as a date

Assuming Z1 and Z2
=SUMIFS(MonthlyExpenses[Actual Cost],MonthlyExpenses[Category],"OTEC", MonthlyExpenses[Date],">="&Z1, MonthlyExpenses[Date],"<="&Z2)
OR
=SUMIFS(MonthlyExpenses[Actual Cost],MonthlyExpenses[Category],"OTEC", MonthlyExpenses[Date],">="&DATEVALUE("1/1/2016"), MonthlyExpenses[Date],"<="&DATEVALUE("31/1/2016")

 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,446
Messages
6,124,896
Members
449,194
Latest member
JayEggleton

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