shubham_options
New Member
- Joined
- Jun 24, 2021
- Messages
- 2
- Office Version
- 2019
- 2016
- Platform
- Windows
I have a column at Q in sheet OC where values are there Q3 to Q24.
These values are fetched in real time. It changes every millisecond. I have raw data in different sheet which changes every millisecond. I use vlookup function to format and give meaning to it in OC sheet in Q column.
I have created two subs
Below sub is used to keep it running every 25millisecond
It stores data according to time mentioned in AA2 and respectively.
These values are fetched in real time. It changes every millisecond. I have raw data in different sheet which changes every millisecond. I use vlookup function to format and give meaning to it in OC sheet in Q column.
I have created two subs
Below sub is used to keep it running every 25millisecond
This sub is used to copy data from Q3:Q24 which is based on vlookup at RTD in different sheet.Sub ATimedRecalc()
TRCopy
Application.OnTime Now + TimeValue("00:00:25"), "ATimedRecalc"
'Application.RTD.RefreshData
End Sub
It stores data according to time mentioned in AA2 and respectively.
Sub TRCopy()
'Copy AT Excel
Dim TRPutOI As String
TRPutOI = "Q3:Q24"
If OC.Range("AA2").Value = Format(Now(), "hh:mm:00") Then --DEBUGGER STOPPED HERE with ERROR 424
If IsEmpty(OC.Range("AA3").Value) Then
OC.Range("AA3:AA24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AB2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AB3").Value) Then
OC.Range("AB3:AB24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AC2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AC3").Value) Then
OC.Range("AC3:AC24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AD2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AD3").Value) Then
OC.Range("AD3:AD24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AE2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AE3").Value) Then
OC.Range("AE3:AE24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AF2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AF3").Value) Then
OC.Range("AF3:AF24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AG2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AG3").Value) Then
OC.Range("AG3:AG24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AH2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AH3").Value) Then
OC.Range("AH3:AH24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AI2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AI3").Value) Then
OC.Range("AI3:AI24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AJ2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AJ3").Value) Then
OC.Range("AJ3:AJ24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AK2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AK3").Value) Then
OC.Range("AK3:AK24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AL2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AL3").Value) Then
OC.Range("AL3:AL24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AM2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AM3").Value) Then
OC.Range("AM3:AM24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AN2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AN3").Value) Then
OC.Range("AN3:AN24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AO2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AO3").Value) Then
OC.Range("AO3:AO24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AP2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AP3").Value) Then
OC.Range("AP3:AP24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AQ2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AQ3").Value) Then
OC.Range("AQ3:AQ24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AR2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AR3").Value) Then
OC.Range("AR3:AR24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AS2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AS3").Value) Then
OC.Range("AS3:AS24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AT2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AT3").Value) Then
OC.Range("AT3:AT24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AU2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AU3").Value) Then
OC.Range("AU3:AU24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AV2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AV3").Value) Then
OC.Range("AV3:AV24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AW2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AW3").Value) Then
OC.Range("AW3:AW24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AX2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AX3").Value) Then
OC.Range("AX3:AX24").Value = OC.Range(TRPutOI).Value
End If
ElseIf OC.Range("AY2").Value = Format(Now(), "hh:mm:00") Then
If IsEmpty(OC.Range("AY3").Value) Then
OC.Range("AY3:AY24").Value = OC.Range(TRPutOI).Value
End If
End If