#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default new to date

Am trying to when day = x add 123 to cell f3
End result will be every time day =x add 123 to cell f3. This will grow with
each month.
I got day out of cell when date changed f3 now #value
This could be done on close or open of workbook. tried all I can think of.
No luck yet.
Thanks to all for help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default new to date

Run this at least once a day:

Sub updatee()
n = Day(Date)
Set f3 = Range("F3")
Set z100 = Range("Z100")
If n = 1 Then
If z100.Value = Date Then
Else
z100.Value = Date
f3.Value = f3.Value + 123
End If
End If
End Sub

the update is performed on the first of the month and is only performed once
on that day. (uses Z100 to remember the update has already been performed)
--
Gary''s Student - gsnu200835


"Curt" wrote:

Am trying to when day = x add 123 to cell f3
End result will be every time day =x add 123 to cell f3. This will grow with
each month.
I got day out of cell when date changed f3 now #value
This could be done on close or open of workbook. tried all I can think of.
No luck yet.
Thanks to all for help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default new to date

I notice your comment "run this at lease once a day" ? Will not z100 keep
all in line if program is not accessed daily. With my limited understanding
this is what it seems. Asking because I am not sure.
For some reason web site did not notify so I only found out by going in to
look some more. Sure do appreciate the help
Thanks

"Gary''s Student" wrote:

Run this at least once a day:

Sub updatee()
n = Day(Date)
Set f3 = Range("F3")
Set z100 = Range("Z100")
If n = 1 Then
If z100.Value = Date Then
Else
z100.Value = Date
f3.Value = f3.Value + 123
End If
End If
End Sub

the update is performed on the first of the month and is only performed once
on that day. (uses Z100 to remember the update has already been performed)
--
Gary''s Student - gsnu200835


"Curt" wrote:

Am trying to when day = x add 123 to cell f3
End result will be every time day =x add 123 to cell f3. This will grow with
each month.
I got day out of cell when date changed f3 now #value
This could be done on close or open of workbook. tried all I can think of.
No luck yet.
Thanks to all for help

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
Concatenate including a date so that the date appears as a date Zembu Excel Worksheet Functions 2 January 6th 10 06:09 PM
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
copy date based on date -refer to date range mindpeace[_4_] Excel Programming 1 June 3rd 06 01:30 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 02:57 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"