Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy paste
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Copy, paste without file name referenced after paste | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |