ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pull and store a value on specific date in another cell (https://www.excelbanter.com/excel-worksheet-functions/53236-pull-store-value-specific-date-another-cell.html)

Brian

Pull and store a value on specific date in another cell
 
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.

Bob Phillips

Pull and store a value on specific date in another cell
 
=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.




Brian

Pull and store a value on specific date in another cell
 
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.





Bob Phillips

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.








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com