Copy paste value from one cell to another if a condition met

March 15, 2012 at 04:10:09
Specs: Windows 7
Hi, I have a spreadsheet that gets updated with data linked via API. I want to copy data from one cell to another if countdown timer which is in a different cell within worksheet reaches certain time i.e. 100. So when cell D4 = 100 I want to copy paste value figure from say F20 to F21. I want this to happen whenever D4 reaches 100. The data will be updated constantly so it may require loop function.

Thanks


See More: Copy paste value from one cell to another if a condition met

Report •

#1
March 15, 2012 at 11:10:10
How is the countdown timer produced? Is it a macro?

If so, just add a line to the code to watch the value of the timer and when it reaches 100 set the destination cell equal to the source cell.

If Range("D4") = 100 then Range("F21") = Range("F20")

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
March 15, 2012 at 11:40:48
Countdown is produced by macro but I can't see the vba codes that fetches the time. Whem D4 reaches 100 I want to copy paste value the figure from F20 to F21 rather than F21 being equal to F20.

Report •

#3
March 15, 2012 at 11:58:34
re: "I want to copy paste value the figure from F20 to F21 rather than F21 being equal to F20"

Huh? If you paste the value from F20 into F21 then F21 will be equal to F20. I mean, what else could it be equal to other than the value that was pasted into it?

What do you mean that you can't see the VBA code? Is the code protected from viewing?

If that's the case, then I guess that you will need a formula in F21. You either have to add code to the existing macro to populate F21 or call another macro from the timer code which will populate F21. In either case, you need to be able to edit the existing code. If you can't do that, you will have to use a formula within the spreadsheet.

What do you want in F21 when D4 is not equal to 100?

We'd need that information before we can offer any suggested formulas.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question