Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDifference Question
I want to compare two cells containing dates (beginning and ending) and
return the number of months difference - the purpose is to use this figure for computing annual turnover. I can't seem to get DateDiff calculation that works in Access to work in Excel Help please DateDiff("m",start, end) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDifference Question
Your code should work in VBA the same way. E.g.,
Debug.Print DateDiff("m", #1/1/2004#, Now) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Junior" wrote in message ... I want to compare two cells containing dates (beginning and ending) and return the number of months difference - the purpose is to use this figure for computing annual turnover. I can't seem to get DateDiff calculation that works in Access to work in Excel Help please DateDiff("m",start, end) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDifference Question
Thanks chip - figured it out - function is a little different and reversed
in excel.... DateDif (start date, end date, "m") "Chip Pearson" wrote in message ... Your code should work in VBA the same way. E.g., Debug.Print DateDiff("m", #1/1/2004#, Now) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Junior" wrote in message ... I want to compare two cells containing dates (beginning and ending) and return the number of months difference - the purpose is to use this figure for computing annual turnover. I can't seem to get DateDiff calculation that works in Access to work in Excel Help please DateDiff("m",start, end) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateDifference Question
use DateAdd function to accomplish your task (it does subtractions too)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
The question is an excel question that I need to figure out howto do in excel. | Excel Worksheet Functions | |||
Another question for Jon | Charts and Charting in Excel |