Hi!
I have a simple VBA where values in Rows 1:10 of Col. A are divided by Values in Rows 1:10 of Col. B and result is given in Rows 1 to 10 of Col. C.
This is code is run every 10 seconds:
Code
Sub Divide()
Range("C1").Value = Range("A1").Value / Range("B1").Value
Application.OnTime Now + TimeValue("00:00:10"), "Divide"
End Sub
The problem is:
1. That the macro will run only on whatever is the current active sheet every 10 seconds, whereas I want it to run only on Sheet1.
2. Only value in cell A1 is being divided with value in cell B1 and result appearing in cell C1, whereas I want calculations for Rows 1 to 10 of Col A and Col. B and respective result in Rows 1 to 10 of Col. C
Any Ideas?
PS: The values in col. A and B are being populated automatically from some other process and not entered manually, and result of Col. C is being used on another worksheet hence this requirement.