Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default find current data with macro

Hi,
i'm looking for the macro code to find out the current date and have
it in this format 20080905 (yyyymmdd)

it's should be easy but i don't find anything about it

please can anyone help me

thanks
francesco
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default find current data with macro

Try

Range("A1").Value = Format(Date, "yyyymmdd")

Mike

"Francesco Magagnino" wrote:

Hi,
i'm looking for the macro code to find out the current date and have
it in this format 20080905 (yyyymmdd)

it's should be easy but i don't find anything about it

please can anyone help me

thanks
francesco

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default find current data with macro

Tnhanks!
i had tried this and it didn't work...
now i have understand!

i used:

Dim y As Date
y = Format(Date, "yyyymmdd")

but the right one was

Dim y As String
y = Format(Date, "yyyymmdd")

Bye bye
Franz

Range("A1").Value = Format(Date, "yyyymmdd")


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find where is the current file saved Holly Excel Discussion (Misc queries) 3 December 5th 07 12:44 PM
How can I Run a query from VB macro with out affect current data in the same sheet? oafdl Excel Discussion (Misc queries) 0 May 29th 06 09:42 PM
Macro to find the first cell in a column with different data Lost in Alabama Excel Discussion (Misc queries) 2 December 14th 05 06:39 PM
Function to find row with most current date malik641 Excel Worksheet Functions 3 June 23rd 05 07:05 PM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:23 AM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"