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: 20
Default Remove unwanted values

I have the following code:

Worksheets("Auto_Working").Range("A2:A11").Value = ListBox2.List

ListBox2 contains 2237, 2388
It produces:

A
1 Employees
2 2237
3 2388
4 #N/A
5 #N/A
6 #N/A
7 #N/A
8 #N/A
9 #N/A
10 #N/A
11 #N/A

When it gets to the #N/A processing data, it has to be manualy stopped.
Please help, I have tried the following to remove them.

For Each Cell In Range("A2:A11")
If LCase(Cell.Value) = "#N/A" Then
Cell.Resize(1, 5).ClearContents
End If
Next Cell

This caused a error, and could not continue or find the #N/A. It stopped in
it's tracks.

 
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
How do I remove or disable unwanted fonts Abi Excel Discussion (Misc queries) 0 October 31st 09 12:56 PM
how do i remove unwanted AutoRecover exceptions? Ree Excel Worksheet Functions 0 June 11th 08 07:54 AM
remove unwanted spaces? Nige Danton Excel Worksheet Functions 5 December 7th 07 01:10 PM
remove unwanted text after the 7th position George P Excel Discussion (Misc queries) 2 January 25th 07 12:04 AM
Remove unwanted tabs greengrass Excel Programming 1 May 30th 05 06:06 AM


All times are GMT +1. The time now is 01:53 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"