View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Why are my date results incorrect

If the results of the formulas are dates, then these cells need to be
formated as dates. If you are using evaluate formula you will see the 39296
becasue the math in excel uses these numbers. Inside VBA you can dimension
variables as dates to make it easier to debug the VBA code.

"Neall" wrote:

I have formated the cells they are showing up as 8/03/2007 however again when
I try to create a formula I am seeing numbers like this 39296
--
Neall


"Joel" wrote:

If you format the cells from general number to date format the 39296 will be
correct. The count if will work correctly if the condition is a date (ie
7/1/07). The math in excel treats the date like numbers. Excel formats the
numbers to real dates for us humans who can't count the number of days from
Jan 1, 1900.

"Neall" wrote:

When use the SQL editor tool in excel and retieve my data. the correct date
format shows, when I import it into excel the correct format shows, but when
I try to use a formula the date shows up as a number

example date shows as 8/2/2007 but when I try to use the countif I see this
in the formula displays 39296

I am thinking this is why my count if statement is not working

--
Neall