ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell Update only at a specific time. (https://www.excelbanter.com/excel-discussion-misc-queries/229052-cell-update-only-specific-time.html)

Scott520

Cell Update only at a specific time.
 
I have a clock running in Excel. Data in one cell is constantly changing. At
a specific time which I specify in a cell, I want the value in the cell that
is constantly changing, snapshot in another cell. How do I do this?
For example, stock prices, they are constantly changing on my spreadsheet
being linked to the internet, at 10:30 I want the price of IBM in a specific
cell.

Luke M

Cell Update only at a specific time.
 
As you have a clock, I'm assuming you're using some type of VBA/macro. You
should be able to stick this snippet into the appropriate place in your code
(after it updates cell)

'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I have a clock running in Excel. Data in one cell is constantly changing. At
a specific time which I specify in a cell, I want the value in the cell that
is constantly changing, snapshot in another cell. How do I do this?
For example, stock prices, they are constantly changing on my spreadsheet
being linked to the internet, at 10:30 I want the price of IBM in a specific
cell.


Scott520

Cell Update only at a specific time.
 
I do not have a VB Macro. I am obtaining this clock update from the internet,
a web page. I am trying to avoid writing a Macro since I have limited
experience with them.

"Luke M" wrote:

As you have a clock, I'm assuming you're using some type of VBA/macro. You
should be able to stick this snippet into the appropriate place in your code
(after it updates cell)

'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I have a clock running in Excel. Data in one cell is constantly changing. At
a specific time which I specify in a cell, I want the value in the cell that
is constantly changing, snapshot in another cell. How do I do this?
For example, stock prices, they are constantly changing on my spreadsheet
being linked to the internet, at 10:30 I want the price of IBM in a specific
cell.


Luke M

Cell Update only at a specific time.
 
I'm afraid for what you want, a macro is inevitable. But fear not, its fairly
simple to put in.

Right click on your sheet tab containing your clock. Click "view code".
Paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
'Change references as appropriate
If Target = Range("A1") Then
'Activates everytime target changes
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
End If
End Sub

Close the Visual Base Editor, and save. You're good to go now!


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I do not have a VB Macro. I am obtaining this clock update from the internet,
a web page. I am trying to avoid writing a Macro since I have limited
experience with them.

"Luke M" wrote:

As you have a clock, I'm assuming you're using some type of VBA/macro. You
should be able to stick this snippet into the appropriate place in your code
(after it updates cell)

'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I have a clock running in Excel. Data in one cell is constantly changing. At
a specific time which I specify in a cell, I want the value in the cell that
is constantly changing, snapshot in another cell. How do I do this?
For example, stock prices, they are constantly changing on my spreadsheet
being linked to the internet, at 10:30 I want the price of IBM in a specific
cell.


CynthiaL

Quote:

Originally Posted by Luke M (Post 827149)
I'm afraid for what you want, a macro is inevitable. But fear not, its fairly
simple to put in.

Right click on your sheet tab containing your clock. Click "view code".
Paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
'Change references as appropriate
If Target = Range("A1") Then
'Activates everytime target changes
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
End If
End Sub

Close the Visual Base Editor, and save. You're good to go now!


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I do not have a VB Macro. I am obtaining this clock update from the internet,
a web page. I am trying to avoid writing a Macro since I have limited
experience with them.

"Luke M" wrote:

As you have a clock, I'm assuming you're using some type of VBA/macro. You
should be able to stick this snippet into the appropriate place in your code
(after it updates cell)

'A1 is your clock cell
'A2 is your fluctuating price cell
'A3 is "snapshot" cell
If Range("A1").Value = TimeValue("10:30") Then
Range("A3").Value = Range("A2").Value
End If
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Scott520" wrote:

I have a clock running in Excel. Data in one cell is constantly changing. At
a specific time which I specify in a cell, I want the value in the cell that
is constantly changing, snapshot in another cell. How do I do this?
For example, stock prices, they are constantly changing on my spreadsheet
being linked to the internet, at 10:30 I want the price of IBM in a specific
cell.



I am having the same situation and issues. I do have a continuous clock macro running but I tried to put the macro you wrote into mine and I still can't get it to work! HELP! : )


All times are GMT +1. The time now is 09:42 PM.

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