London_Calling
Active Member
- Joined
- Feb 27, 2007
- Messages
- 256
Hi folks,
I'm a real novice with VBA and would just like a little help to tweak my code. This procedure is working with live streamed data, it works very well but I'd like to cannibalise it to help with another issue:
As you can see, it copies data in cell C2 (in sheet Data1), and pastes it in the next empty cell in row D of (sheet Data2).
What I'd like to do now is have the smallest number in the range H5:H34 (of sheet Data1) do the same thing, except paste to the next available cell in row D (I can work that part out though!) - so it's a formula issue rather that a straight 'lift' from another sheet.
I think maybe the streaming data aspect might complicate things. Perhaps I should also mention the data updates once a second.
Perhaps I need to write a user defined function?
Any help most gratefully received. Thanks.
I'm a real novice with VBA and would just like a little help to tweak my code. This procedure is working with live streamed data, it works very well but I'd like to cannibalise it to help with another issue:
Code:
If Target.Row <> 1 Then Exit Sub
With ThisWorkbook.Worksheets("Data1").Range("C2")
.Copy
End With
With ThisWorkbook.Worksheets("Data2")
.Cells(Rows.Count, "D").End(xlUp).Offset(1, 0).PasteSpecial
End With
Application.CutCopyMode = False
What I'd like to do now is have the smallest number in the range H5:H34 (of sheet Data1) do the same thing, except paste to the next available cell in row D (I can work that part out though!) - so it's a formula issue rather that a straight 'lift' from another sheet.
I think maybe the streaming data aspect might complicate things. Perhaps I should also mention the data updates once a second.
Perhaps I need to write a user defined function?
Any help most gratefully received. Thanks.