0
votes

I have a table of mortgage loans in Excel. I want to sum the loan amounts(B:B) for loans whose lock dates(D:D) were in the previous month. I am trying to use the "SumIF" function to pull criteria from a different cell as below:

=SUMIF(range,"*"&A1&"*",sum_range)

But I want to pull a "date between previous month start and previous month end" range. I've used this for another function and it has worked.

D:D,">="&EOMONTH(TODAY(),-2)+1,D:D,"<"&EOMONTH(TODAY(),-1)+1

Now, I am trying to infuse the latter function into the first, something like this, but it is not returning anything. Any help would be much appreciated!

=SUMIF(Data!D:D,"*">="&EOMONTH(TODAY(),-2)+1,Data!D:D,"<"&EOMONTH(TODAY(),-1)+1)*",Data!B:B)
1
That last formula is a SUMIFS, right? If not it should be.BigBen
It errors when I try to use SUMIFS instead of SUMIFJosh Briggs

1 Answers

0
votes

Use SUMIFS when you have multiple criteria, and from your explanation, it seems like you don't need the wildcard "*".

=SUMIFS(B:B,D:D,">="&EOMONTH(TODAY(),-2)+1,D:D,"<"&EOMONTH(TODAY(),-1)+1)

enter image description here