#1
|
|||
|
|||
Date diff in excel 2007
Hi I have 3 cells E1,F1,G11
I want to store cell IDs containing dates in E1 and F1. Cell G1 will show the number of days difference. EG: E1 = '06/04/2017 19:00:00' F1 = '28/04/2017 19:00:00' G1 = '22 Days' I tried entering =DATEDIF(F1,E1,"D") into cell G1 but it doesn't work. |
#2
|
|||
|
|||
Change to:
=DATEDIF(E1,F1,"D") |
#3
|
|||
|
|||
=DATEDIF(F1,E1,"D")
=DATEDIF(E1,F1,"D") All you have done is reversed the 2 cells. This would give a negative value but it doesn't work. |
#4
|
|||
|
|||
Have you actually tried?
What do you mean by "giving a negative value"? |
#5
|
|||
|
|||
No you are missing the point.
Cell B2 has the date Value "25/03/2017 11:30:00" Cell B8 has the date value "31/03/2017 12:00:00" NOW I am going to but into cell E2 the text value 'B2' I am going to but into cell F2 the text value 'B8' What I want to put into cell G2 is a calculation which requires it to LOOK at Cell E2 find the contents of that cell and look at as a pointer to the cell containing the date. Cell E2 and F2 don't have a date value just the pointer to the cell that has the date. It is a reference/pointer |
#6
|
|||
|
|||
How about the attached?
|
#7
|
|||
|
|||
Is everybody over thinking this ?
G1 = F1-E1 Format G1 as Month, if the answer insn't allready correct. |
#8
|
|||
|
|||
Thanks XOR
=DATEDIF(INDIRECT(E2),INDIRECT(F2),"d") Never heard of INDIRECT(...) |
#9
|
||||
|
||||
Just be aware that INDIRECT is a volatile function
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#10
|
|||
|
|||
INDIRECT is volatile? Not sure what you mean by this!
|
#11
|
||||
|
||||
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel pivot table with a DATE value field for some reason stops at a certain date | angie450 | Excel Programming | 2 | 08-19-2014 08:50 AM |
Letter date changes when merging with Excel - not the format, the actual date! | Smallweed | Mail Merge | 1 | 02-07-2014 06:00 PM |
Date problem in excel 2007 | msheyworth | Excel | 2 | 06-12-2012 05:10 AM |
range.insertfile produces diff result between word 2010 and 2007 | rsmedley | Word | 1 | 02-15-2012 10:48 PM |
Colorised diff add-on? | liamf | Outlook | 0 | 12-15-2010 08:02 AM |