Excel/excel formula

Advertisement


Question
Please help. I need to know an Excel formula for calculating days past due. I have a column with "due date". column with "date paid" and a column with" days past due". The days past due column I need it to state the days past due. if the "date paid" column reads a date, then I need it to state the number of days it was past due..BUT ALSO if the "date paid" column is blank, it has a number of days past due based on the current date and the due date.
thank you

Answer
Column A: Date Due
Column B: Date Paid (or blank)
Column C: Past Due

Row 1 is column headings. In C2:

=if(ISBLANK(B2),now()-A2,C2-A2)

What this means:

ISBLANK(B2)  means if cell B2 is blank
NOW()  means today, right now
NOW() - A2 will return the number of days between today and the date in cell A2

So if B2 is blank, give me the number of days between today and the due date.
Otherwise give me the number of days between the date it was paid and the due date.

You want to return the number of days, so you must have the cell C2 formatted as a number (no decimals) and NOT as a date.

Hope this helps.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Anne Troy

Expertise

Virtually all common questions about Microsoft Excel, including all versions. Help with formulas, functions, optimum data layout, and application management. Please: No VBA or macro questions.

Experience

I taught Advanced Microsoft Excel to the senior accountants at the Environmental Protection Agency. Let's hope they were listening.

Publications
Dreamboat on Word Office VBA: Macros You Can Use Today

Education/Credentials
Self-taught and worked with the best in Microsoft Office applications.

Awards and Honors
Microsoft Word MVP 2008

©2016 About.com. All rights reserved.