Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CBG CBG is offline
external usenet poster
 
Posts: 1
Default Adding a date to a cell

Hello,
How can I add a date to a cell?
I have tried
Worksheets("Sheet1").Range("A1").Value = Now
But I keep getting a subscript out of range error message.
Please help!
Thanks. :-)
Consuelo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Adding a date to a cell

Consuelo

Perhaps you have no Sheet1 ?

Gord Dibben Excel MVP XL2002

On Sat, 20 Sep 2003 19:21:44 -0700, "CBG" wrote:

Hello,
How can I add a date to a cell?
I have tried
Worksheets("Sheet1").Range("A1").Value = Now
But I keep getting a subscript out of range error message.
Please help!
Thanks. :-)
Consuelo


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Adding a date to a cell

Click the cell you wish to contain the automatic date entry, type
=NOW()
or
=TODAY()
See which one works best for you.


"CBG" wrote in message
...
Hello,
How can I add a date to a cell?
I have tried
Worksheets("Sheet1").Range("A1").Value = Now
But I keep getting a subscript out of range error message.
Please help!
Thanks. :-)
Consuelo



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding a date to a cell

Just a little addition/elaboration to Gordon's excellent advice:

Given your line of code, the only thing that could cause that message would
be if you don't have a sheet with a tab name of Sheet1. It might be Sheet
1 (with a space after sheet) or it could be sheet1, but contain one or more
spaces tacked on at the front or the back of the name. Try renaming the
sheet so you are sure it is named sheet1 with no spaces.

--
Regards,
Tom Ogilvy

CBG wrote in message
...
Hello,
How can I add a date to a cell?
I have tried
Worksheets("Sheet1").Range("A1").Value = Now
But I keep getting a subscript out of range error message.
Please help!
Thanks. :-)
Consuelo



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
Adding A Date To Adjacent Cell FS Excel Worksheet Functions 2 March 29th 10 10:52 PM
adding days from one cell with a date in it to another cell cufc1210 Excel Discussion (Misc queries) 4 August 20th 09 12:40 PM
Adding days to a date cell to get a new date Pete Derkowski Excel Worksheet Functions 6 May 1st 08 03:53 PM
Using a date (datevalue) to trigger adding a value to a cell Ashman Excel Worksheet Functions 10 September 17th 07 02:39 AM
Adding a fixed date to a cell Erik Jahre Excel Worksheet Functions 2 June 20th 05 10:00 PM


All times are GMT +1. The time now is 05:46 PM.

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

About Us

"It's about Microsoft Excel"