# help with Excel 2008 date formula

Discussion in 'Mac Apps and Mac App Store' started by kproyer, Feb 28, 2009.

1. ### kproyer macrumors newbie

Joined:
Feb 28, 2009
#1
I have a very limited knowledge of Excel, but generally find that I can figure things out eventually. However, this time, I just can't seem to tweek it so the result is what I want.

I have a spreadsheet for tracking parts ordered, and simply need to display how many days a part has been on order. I have a column for date ordered, and one for date received. Is there a way to program the formula to tell me the days that a part has been on order without displaying today's date in the spreadsheet (leaving it blank), and still be able to enter the date that it does arrive for our records?

thanks!

### Staff Member

Joined:
Apr 2, 2008
Location:
UK
#2
I just had a quick play and think I can do what you need.

Have both the date columns formatted to Date. Then in the 'Amount of days on order column format the cell as a number. Now do a formula where it takes the difference between the two dates in this number formatted cell. It gives you the difference between the two dates.

Hope that makes sense!

***Not what you require, I will try and find out if what you want is actually possible***

3. ### peetah macrumors member

Joined:
Feb 28, 2009
#3
a1 contains =date(2009,02,16)
a2 contains =DATEDIF(A1,(TODAY()),"D")

Good luck

### Staff Member

Joined:
Apr 2, 2008
Location:
UK
#4
success, all be it a very crude method. I have attached a screen shot.

In the top right hand corner I have a put '=TODAY()' which displays todays date. Change the colour to white so it cannot be seen. (You could probably hide it using a better method) You can enter the date the parts are ordered and it will count the number of days between today's date and the time of order.

***Shot down, damn it***

File size:
12.7 KB
Views:
23
5. ### peetah macrumors member

Joined:
Feb 28, 2009
#5
No need to do a white color....

Assuming the following:
a1 contains =date(2009,02,16)
b1 is where your received date will be
c1 is the following: =IF(ISBLANK(B1),DATEDIF(A1,(TODAY()),"D"),"")

If B1 is anything but blank (null), then C1 will be populated with the days that the part is on order (today - date ordered)

Good luck!