Forum Discussion
Kory_DeaversUW
Dec 01, 2022Copper Contributor
Return number of Days in Excel if certain criteria met
I have an excel spreadsheet for when expense reports are approved by corporate. I am trying to write a formula that looks at a cell that either has Paid, Approval in Process or Pending in it and want it to return the number of days it has been from date in another column if it does NOT equal Paid.
- PeterBartholomew1Silver Contributor
= IF(status="Paid", approved-submitted, "Not Paid") = IF(status<>"Paid", today-submitted, "Paid")
I suspect the formula you require is very similar to that you already have.
The name 'today' refers to a cell containing the formula
= TODAY()
- OliverScheurichGold Contributor
=IF(OR(G2="Approvals in Process",G2="Pending"),TODAY()-D2,"Paid")
Does this return your expected result?
- Kory_DeaversUWCopper Contributor