View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default vba - change column "type"

Hi
if these values are both stored as real date values you can simply use
=DATEDIF(INT(A1),INT(A2))

--
Regards
Frank Kabel
Frankfurt, Germany

"MJ" schrieb im Newsbeitrag
om...
Hi,

I have a csv that gets opened in excel. One column contains cells
with the format of Date (mm/dd/yyyy). I need to get the difference
between this date and the date in another column. My problem is that
the format of the other column is shown as "Custom" (m/d/yyyy h:mm).

Is there a way to get the custom column to be the same format as the
first column so that I can do a datediff?

Thanks,
MJ