LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default If #N/A in Col. AB, copy/paste Items in Col C. to New Sheet

Struggling with the code below:
Sub CopyData10()
Dim rng As Range, cell As Range
Dim rw As Long
Set rng = Worksheets("diego").Range("AB2:AB630")
rw = 1
For Each cell In rng
If cell.Value = "#N/A" Then
Worksheets("Summary Sheet").Cells(rw, "C") = cell.Offset(0, -1)
rw = rw + 1
End If
Next
End Sub

The code fails on this line. i guess there is not an equivalent of #N/A in
VBA. What do I need to use? By the way, the #N/A is the result of a
function; it is not hard-coded.

Thanks,
Ryan---


--
RyGuy
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Paste from Class Sheet to Filtered List on Combined Sheet [email protected] Excel Programming 6 September 16th 08 04:30 PM
Help to code Macro to Copy fron one sheet and paste in other sheet kay Excel Programming 3 July 25th 08 06:46 PM
Dificulty in copy and paste when items is filtered in excel 2007 henksa Excel Worksheet Functions 2 August 21st 07 07:34 PM
copy a list of items from word and paste in cell Priscilla Excel Discussion (Misc queries) 1 November 11th 05 06:51 PM
Copy 2 items to next sheet RJH Excel Programming 3 March 6th 04 07:33 AM


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"