Reputation: 33
I've got stuck with IF statement in Excel 2010. Exercise is going like this: "Student is INACTIVE if he didn't login to website more then a year, else he's active."
Since I've been not using Excel for years, and now I'm forced to because of university, can you guys help me about this, I'd be really thankfull.
No matter what I do, everyone is ACTIVE or INACTIVE, depends on my IF statement, I was going like: Mark one field > 365, value if true="Active", value if false="Inactive", but seems not to work out.
=IF(D5-TODAY()>365,"Active","Inactive");
doesn't seem to work out.
Here is a screenshot: https://i.sstatic.net/H8kUY.png
Upvotes: 3
Views: 70
Reputation: 2233
=IF(TODAY()-D5<365,"Active","Inactive")
I would suggest putting the TODAY()
function in on cell, and then use that ONE cell in multiple formulas. Like so:
=IF($A$1-D5<365,"Active","Inactive")
- considering formula in $A$1
is =TODAY()
Instead of days count, you can use EDATE
for calculating exact date 12 months ago. Then use that as your criteria.
Upvotes: 3