PC Review


Reply
Thread Tools Rate Thread

Automatic Date if data entered in sheet

 
 
Mayte
Guest
Posts: n/a
 
      25th Jun 2009

I have a book with 32 sheets. One for each day (31 days) and a monthly
roll-up sheet. In my monthly roll-up sheet i would like to have an automatic
"date range" in cell A2.

The date range will always begin with the first day of the month but it will
end with whatever date (sheet) is the last updated. I mean, if I have data on
all my sheets from June 01 to June 25 but June 26 - June 30 are blank (and
the 31st sheet is blank too), the date range should say "June 01 - June 25"
and each day it will get updated when data is entered into a sheet

Does that make sense??

Any ideas will be greatly appreciate it!

Cheers,
Mayte
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      25th Jun 2009

Change the d2 to a cell you want to check on each sheet. However, I see no
reason not to have all on ONE sheet with a date column and use
data>filter>autofilter to see the individual days. Lots of advantages.

Sub backsardssheet()
For i = Sheets.Count To 2 Step -1
If Sheets(i).Range("d2") > 0 Then
Exit For
End If
Next
MsgBox "June 1 - " & Sheets(i).Name
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Mayte" <(E-Mail Removed)> wrote in message
news82D6152-8AE0-493B-AE9B-(E-Mail Removed)...
>I have a book with 32 sheets. One for each day (31 days) and a monthly
> roll-up sheet. In my monthly roll-up sheet i would like to have an
> automatic
> "date range" in cell A2.
>
> The date range will always begin with the first day of the month but it
> will
> end with whatever date (sheet) is the last updated. I mean, if I have data
> on
> all my sheets from June 01 to June 25 but June 26 - June 30 are blank (and
> the 31st sheet is blank too), the date range should say "June 01 - June
> 25"
> and each day it will get updated when data is entered into a sheet
>
> Does that make sense??
>
> Any ideas will be greatly appreciate it!
>
> Cheers,
> Mayte


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      25th Jun 2009

Assuming you fire from the Summarysheet.
Sub backsardssheet()
For i = Sheets.Count To 2 Step -1
If Sheets(i).Range("d2") > 0 Then
Exit For
End If
Next
range("a2")= "June 1 - " & Sheets(i).Name
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Change the d2 to a cell you want to check on each sheet. However, I see no
> reason not to have all on ONE sheet with a date column and use
> data>filter>autofilter to see the individual days. Lots of advantages.
>
> Sub backsardssheet()
> For i = Sheets.Count To 2 Step -1
> If Sheets(i).Range("d2") > 0 Then
> Exit For
> End If
> Next
> MsgBox "June 1 - " & Sheets(i).Name
> End Sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Mayte" <(E-Mail Removed)> wrote in message
> news82D6152-8AE0-493B-AE9B-(E-Mail Removed)...
>>I have a book with 32 sheets. One for each day (31 days) and a monthly
>> roll-up sheet. In my monthly roll-up sheet i would like to have an
>> automatic
>> "date range" in cell A2.
>>
>> The date range will always begin with the first day of the month but it
>> will
>> end with whatever date (sheet) is the last updated. I mean, if I have
>> data on
>> all my sheets from June 01 to June 25 but June 26 - June 30 are blank
>> (and
>> the 31st sheet is blank too), the date range should say "June 01 - June
>> 25"
>> and each day it will get updated when data is entered into a sheet
>>
>> Does that make sense??
>>
>> Any ideas will be greatly appreciate it!
>>
>> Cheers,
>> Mayte

>


 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      25th Jun 2009

Not sure how to tell if a sheet is empty on purpose or because it has not
been used.
However, this would provide an as of type date, based on the current date.

=TEXT(NOW(), "mmm") & " 01 To " & TEXT(NOW(), "d")


"Mayte" <(E-Mail Removed)> wrote in message
news82D6152-8AE0-493B-AE9B-(E-Mail Removed)...
>I have a book with 32 sheets. One for each day (31 days) and a monthly
> roll-up sheet. In my monthly roll-up sheet i would like to have an
> automatic
> "date range" in cell A2.
>
> The date range will always begin with the first day of the month but it
> will
> end with whatever date (sheet) is the last updated. I mean, if I have data
> on
> all my sheets from June 01 to June 25 but June 26 - June 30 are blank (and
> the 31st sheet is blank too), the date range should say "June 01 - June
> 25"
> and each day it will get updated when data is entered into a sheet
>
> Does that make sense??
>
> Any ideas will be greatly appreciate it!
>
> Cheers,
> Mayte



 
Reply With Quote
 
Mayte
Guest
Posts: n/a
 
      25th Jun 2009

thank you both !!!
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      25th Jun 2009

TRY the autofilter

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Mayte" <(E-Mail Removed)> wrote in message
news:198A4F5B-6DB1-46F9-924D-(E-Mail Removed)...
> thank you both !!!


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a Macro in Excel 2004 to move entered data from one sheet toanother and space between rows when next data is entered? bella.sandi@gmail.com Microsoft Excel Programming 1 4th Jun 2008 05:08 PM
Macro to record date on sheet data is entered in a cell ? =?Utf-8?B?SmltIHNjcml2ZW5lcg==?= Microsoft Excel Programming 2 24th Aug 2006 05:56 PM
excel, automatic date and time when info gets entered =?Utf-8?B?c2hvcnR5?= Microsoft Excel Worksheet Functions 4 26th Apr 2006 06:46 PM
can entered data in sheet 1 be automatically pasted in sheet 2 =?Utf-8?B?QWRuYW4gSmFoYW5naXI=?= Microsoft Excel Misc 1 23rd Feb 2006 10:06 AM
Automatic Date linked to another field being entered Trey Microsoft Access 3 17th Jul 2003 03:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:03 PM.