New row after server data input and copy forumla.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greeting all, I'm looking for a Macro that will help me out.

Here's my scenario: I have intermittent (maybe every second or spontaneous)
data entered in Excel via an OPC server. The data is entered per row, so I
may have 30 values entered along row 1. The cell's formula may look like
this:
=OPC|TagValues!servername.datavalue
What I'm trying to do is check to see if data has been entered in the row,
if it was entered go to the next row while copying the forumla to the new
row. So basically, the data will propogate down the spreadsheet as the
server sends more data.

Thanks for any help,
Nate
 
I think I made it more complicated sounding than it really is. Nevermind the
data. Can you check for an empty cell? Can you copy the formula from one
cell to the next? All by a Macro?
 
Here's a start, can someone help me with more?

Public Sub CopyDown()
LastRow = Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("A" & i).Value = "" Then
Range("A" & i - 1 & ":CB" & i - 1).Copy Destination:=Range("A" & i)
End If
Next i
End Sub
 
Back
Top