Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Arnold Scott   on Oct 24 In MS Office Category.

  
Question Answered By: Stacie Martin   on Oct 24


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 20 values entered along row  1. The
cell's formula  may look like
this:
=OPC|TagValues!servername.datavalue

I think my code now will only copy  the cells above and not the
formula. Nor will it check  for an empty cell.

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


I need it to check the A* cell  to see if empty, if it's not jump to
the next row while copying the formula of the cell above.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on VBA help with data Or get search suggestion and latest updates.


Tagged: