Boa Tarde, tudo bem ?
Estou usando um Macro, onde os novos dados são atualizados na primeira linha, durante certo período de tempo pré setado, e as demais celulas abaixo vão sendo preenchidas com os valores antigos.
Exemplo:
B C D E
Linha 2 10:00 000 000 000
Linha 3 09:30 000 000 000
Linha 4 09:00 000 000 000
Eu queria fazer o contrario, gostaria de que as células abaixo fossem atualizadas com os novos valores.
Exemplo:
B C D E
Linha 2 09:00 000 000 000
Linha 3 09:30 000 000 000
Linha 4 10:00 000 000 000
Alguém pode me ajudar ?
Código Usado:
Sub Start()
If Range("G3").Value = "Aberto" Then
Application.OnTime Now + TimeValue("00:00:01"), "Cron"
Application.OnTime Now + TimeValue("00:00:01"), "Inserção_Dados"
End If
If Range("G3").Value <> "Aberto" Then
PeríodoPregão
End If
End Sub
-----------------------------------------------------------------------------------------------------------------
Sub Cron()
If Range("G3").Value = "Aberto" Then
Range("B3").Value = Now
Application.OnTime Now + TimeValue("00:00:01"), "Cron"
Else
PeríodoPregão
End If
End Sub
---------------------------------------------------------------------------------------------------
Sub Inserção_Dados()
If Range("B3").Value <> Range("B4").Value Then
Rows("4:100").Value = Rows("3:99").Value
Range("C3").Value = Range("F4").Value
Range("D3").Value = Range("F4").Value
Range("E3").Value = Range("F4").Value
Application.OnTime Now + TimeValue("00:30:00"), "Inserção_Dados"
End If
End Sub