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: 363
Default Remove Numerical Values from Listbox and Certain Text Value

I need to remove ANY Value that is a NUMERIC VALUE and
Remove any Value that is a Text Value = "Section Length" within Column C in the Below Code,
so they are NOT listed.

How can i do this ?


Private Sub UserForm_Activate()
Application.ScreenUpdating = False
Dim LastCell As Long
Dim myrow As Long
Dim NoDupes As Collection
On Error Resume Next
LastCell = Worksheets("InspectionData").Cells(Rows.Count, "A").End(xlUp).Row
With ActiveWorkbook.Worksheets("InspectionData")
.Select
Set NoDupes = New Collection
For myrow = 1 To LastCell
If .Cells(myrow, 1).Offset(-1, 2) < "" Then
On Error Resume Next
NoDupes.Add .Cells(myrow, 1).Offset(-1, 2).Value, CStr(.Cells(myrow, 1).Offset(-1,
2).Value)
If Err.Number = 0 Then
ListBox1.AddItem .Cells(myrow, 1).Offset(-1, 2)
End If
On Error GoTo 0
End If
' End If
Next
End With
Application.ScreenUpdating = True
End Sub

Corey....


 
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
Converting text to numerical values J New Users to Excel 1 February 16th 10 04:14 PM
text and numerical values in two columns Bev[_2_] Excel Discussion (Misc queries) 3 May 26th 08 03:12 PM
text has numerical values TXEagle Excel Worksheet Functions 5 August 16th 05 11:34 PM
Assign numerical values to text codes Bridget Excel Worksheet Functions 3 April 18th 05 11:33 PM
Copying Text vs. Numerical Values T. Jenkins[_2_] Excel Programming 1 August 21st 03 04:03 AM


All times are GMT +1. The time now is 02:33 AM.

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

About Us

"It's about Microsoft Excel"