Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
changing a vlookup formula using a macro Arain Excel Discussion (Misc queries) 6 October 23rd 07 05:12 PM
Automation Macro for updating formula when changing cell value Danny Excel Discussion (Misc queries) 2 August 17th 07 02:22 AM
Automation Macro for updating formula when changing cell value Danny Excel Discussion (Misc queries) 0 August 17th 07 01:47 AM
get the value of a formula in cell B1 into cell A1 without changing my current cell selection News[_4_] Excel Programming 3 October 21st 06 12:24 AM
changing cell formula part of macro thephoenix12[_6_] Excel Programming 1 August 12th 05 10:00 PM


All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"