Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro when when changing cell value with formula.
Hi.
I am running a workbook that getting it´s values from a different program. This program is "putting" the data into the workbook. In this data there is a countdown clock that counts down to "take off" for a race. I have a IF formula in Excel to get out the value"logg", in cell E28, if the value in the countdown clock is below 00:00:30 and value "not" if it´s anything else. This values is linked to another workbook, in cell M1. When this value is changing from "not" to "logg" i want to run "Macro1" that copy specific data from A1:H10 fromthe first workbook to the other with a offset so the data is been pasting in after each other. I have tried with sub change and selection change codes that i found in here but the only thing that happens is that the dialog window for the macro is popping up. I also tried with the calculate sub and it works but it´s keep running every second and pasting in the data over and over again until the value in cell M1 is changing to "not" . I hope anyone can help me with this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro when when changing cell value with formula.
You can't stop the caculate event from running, but you can use another cell
to determine if the data has been written. Set cell A1 to False before starting the timer In the calculate function do this if Range("A1") = false if Range("E28") < timevalue("00:00:30") then 'enter you copy code here Range("A1") = True end if end if "Kollijonke" wrote: Hi. I am running a workbook that getting it´s values from a different program. This program is "putting" the data into the workbook. In this data there is a countdown clock that counts down to "take off" for a race. I have a IF formula in Excel to get out the value"logg", in cell E28, if the value in the countdown clock is below 00:00:30 and value "not" if it´s anything else. This values is linked to another workbook, in cell M1. When this value is changing from "not" to "logg" i want to run "Macro1" that copy specific data from A1:H10 fromthe first workbook to the other with a offset so the data is been pasting in after each other. I have tried with sub change and selection change codes that i found in here but the only thing that happens is that the dialog window for the macro is popping up. I also tried with the calculate sub and it works but it´s keep running every second and pasting in the data over and over again until the value in cell M1 is changing to "not" . I hope anyone can help me with this. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro when when changing cell value with formula.
Hi.
Thanks for the answer, but i dont know how to set the cells to false. The problem is that the data is pasted into different rows for each time. Like A1:H10, A12:H10, A22:H10 and so on. It´s around 70-100 times each day this copy event happens Thanks again. "Joel" wrote: You can't stop the caculate event from running, but you can use another cell to determine if the data has been written. Set cell A1 to False before starting the timer In the calculate function do this if Range("A1") = false if Range("E28") < timevalue("00:00:30") then 'enter you copy code here Range("A1") = True end if end if "Kollijonke" wrote: Hi. I am running a workbook that getting it´s values from a different program. This program is "putting" the data into the workbook. In this data there is a countdown clock that counts down to "take off" for a race. I have a IF formula in Excel to get out the value"logg", in cell E28, if the value in the countdown clock is below 00:00:30 and value "not" if it´s anything else. This values is linked to another workbook, in cell M1. When this value is changing from "not" to "logg" i want to run "Macro1" that copy specific data from A1:H10 fromthe first workbook to the other with a offset so the data is been pasting in after each other. I have tried with sub change and selection change codes that i found in here but the only thing that happens is that the dialog window for the macro is popping up. I also tried with the calculate sub and it works but it´s keep running every second and pasting in the data over and over again until the value in cell M1 is changing to "not" . I hope anyone can help me with this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing a vlookup formula using a macro | Excel Discussion (Misc queries) | |||
Automation Macro for updating formula when changing cell value | Excel Discussion (Misc queries) | |||
Automation Macro for updating formula when changing cell value | Excel Discussion (Misc queries) | |||
get the value of a formula in cell B1 into cell A1 without changing my current cell selection | Excel Programming | |||
changing cell formula part of macro | Excel Programming |