LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default Pull and store a value on specific date in another cell

You could try some VBA

Option Explicit

Private Sub Workbook_Open()
On Error GoTo wb_exit:
Application.EnableEvents = False
With Worksheets("Sheet1")
If Day(Date) = 14 Then
.Range("B1").Value = .Range("A1").Value
ElseIf Day(Date) < 14 Then
.Range("B1").Value = ""
End If
End With
End If

wb_exit:
Application.EnableEvents = True
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian" wrote in message
...
But what if the value of A1 changes nearly every day. I only want the

value
that was in cell A1 on the 14th?

"Bob Phillips" wrote:

=IF( DAY( TODAY() )=14, A1, "")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian" wrote in message
...
What I have is a number in A1, which changes nearly every day. I would

like
to set up a formula in, let's say A2 that says something along the

lines
of
pull the value and A1 on the 14th of the month and store that value.
I was thinking of something like:
=IF( DAY( TODAY() )=14, A1, "")
but obviously, the value obtained on the 14th is erased the following

day.
I
would like cell A2 to hold this value from the 14th for the rest of

the
month. Thanks in advance for any help.






 
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



All times are GMT +1. The time now is 10:28 AM.

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"