Copy paste
Sub CopyData()
dim rng as range, cell as Range
Dim rw as Long
On Error Resume Next
set rng = Range("F1:F510").SpecialCells(xlformulas,xlErrors)
On Error goto 0
rw = 0
if not rng is nothing then
for each cell in rng
if cell.Text = "#N/A" then
rw = rw + 1
cells(rw,"G").Value = cells(cell.row,"A").Value
end if
Next
End if
End Sub
--
Regards,
Tom Ogilvy
"Geir" wrote in message
...
Hi All
I have a written macro that sort a range form A1:F510
But if #N/A is in the F column I want to copy the values in A column to
another cells. Can anyone help me with that.
Geir
|