Copy Range D6:P6 in every 2 minutes And PASTE Values to Down Cells Continuesly in every 2 minutes

tkasiddique

New Member
Joined
Aug 26, 2019
Messages
4
Dear Sir,
Iam a small NSE Option Trader.
For Open Interest Tracker, i have designed a excell sheet Name OI Tracker.
In this sheet i get the updated Open Interest Values From D6:P6 (These Values get updated when the Open Interest data Updates in www.nse.com. So i need to get it copied the below cells in every 2 minutes (for doing analysis on market Trends).

For weeks and months i tried a lot of ways by watching you tube and all. But i couldnt get a correct solution.
So last only i reached this Group. so i hope from this board i have a solution for my probs.

expect a positive actions from the experts over here.
Thank you very much
 

tkasiddique

New Member
Joined
Aug 26, 2019
Messages
4
No sir. not used. Because iam not familiar with codes. i use excel copy paste only.
i used manual copy and past every time. i refresh first manually, when the value changes, i copy the row and past special manually down to next raw.
If you can help then will be great sir.
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

You could test following

Code:
Option Explicit

Dim t As Date

Sub StartMacro()
    t = DateAdd("s", 120, Time)
    Application.OnTime t, "MyMacro"
End Sub

Sub MyMacro()
    Rows("7:7").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("D7:P7").Value = Range("D6:P6").Value
End Sub

Sub StopMacro()
    Application.OnTime t, "MyMacro", False
End Sub
Hope this will help
 
Last edited:

tkasiddique

New Member
Joined
Aug 26, 2019
Messages
4
Sir, i checked today and its working.
it inserts new raw below d6 like that it come. But my requirment is that Copy D6:P6 should copy and paste Down wards like
fist paste at D7, then next Copy Paste to D8, Next to D9 like that it needed.
If it is not possible, then also iam happy with it.
Thank you for your great Support and actions.
Thanks alot Boss
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

Below is your modification

Code:
Option Explicit

Dim t As Date

Sub StartMacro()
    t = DateAdd("s", 120, Time)
    Application.OnTime t, "MyMacro"
End Sub

Sub MyMacro()
Dim last As Long
    last = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row + 1
    Range("D" & last & ":" & "P" & last).Value = Range("D6:P6").Value
End Sub


Sub StopMacro()
    Application.OnTime t, "MyMacro", False
End Sub
Hope this will help
 

tkasiddique

New Member
Joined
Aug 26, 2019
Messages
4
Sir,
Sorry for the delay. Due to work busy this delay happened.
Sir,
It is working as i wish.Copy and Past to the down ward.
But the problem is only 4 or 5 rows getting filled.
Then it is stopping.
If again i run macro, then it working again for some rows.
Iam doing run macro continuesly, and getting worked.
Thank you very much Sir
 

Forum statistics

Threads
1,081,902
Messages
5,361,964
Members
400,667
Latest member
cryptomike

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top