Formatted Date screwing with IF statement

treaves04

Board Regular
Joined
Jul 2, 2012
Messages
62
Office Version
  1. 365
Platform
  1. Windows
I am working on a rent roll sheet that can tell the difference between weekly and monthly tenants. I am using the TEXT function to format the date with this formula:
=IF($E$4="Monthly",TEXT(EDATE(A10,1),"MMM YYYY"),TEXT(A10+7,"MMM-DD-YYYY"))
That is working Fine, but the next column is used to call the Amount paid for each period using this formula:
=SUMIFS(RentRec_Amt,RentRec_Unit,$B$1,RentRec_DateRec,">="&A10,RentRec_DateRec,"<"&A11) Where A11 is the First of the month and A12 is the first of the next month. This also works fine.

What I would like to do now to to add an IF statement to my SUMIFS formula that will look at the current date, TODAY(), and either lookup the rents paid using the second formula, or if the rent is not due yet, simply state "Not Due". The problem seems to be that using the TEXT function to format the dates is causing my IF statement to always see a TRUE value returned, thus showing ALL rent "Not Due". I tested by using a simply IF in another column, =IF(A10>$E$1,TRUE,FALSE). This simply formula is always returning a TRUE value.

I think the problem is with the TEXT function, but I am not sure how else to achieve the results. Any suggestions are appreciated.
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

treaves04

Board Regular
Joined
Jul 2, 2012
Messages
62
Office Version
  1. 365
Platform
  1. Windows
Apparently typing it out helped clear my mind. By Using DATEVALUE I was able to fix it.
=IF(DATEVALUE(A10)>$E$1,"Not Due",SUMIFS(RentRec_Amt,RentRec_Unit,$B$1,RentRec_DateRec,">="&A10,RentRec_DateRec,"<"&A11))
Maybe this will help someone else in the future.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,437
Messages
5,596,125
Members
414,043
Latest member
thomas Stein

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
Top