View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Function in Excel

Hi,

Try this

mynewtime = Format(DateAdd("yyyy", -1, Now), "dd/mm/yyyy")

Mike

" wrote:

I am looking to use a function in VBA like =DATE(YEAR(NOW())-1,MONTH
(NOW()),DAY(NOW()))

How can I do this?

I tried: Application.WorksheetFunction.Date(Year(Now()) - 1, Month(Now
()), Day(Now())) without success.

Thanks.