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: 90
Default Works for number but not text

I am using the following code it works for numbers but not for text, any
suggestions please

Sub MixerTypeFilter()

If Not UserForm7.ComboBox4.Text = "" Then
Dim MyRange, MyRange1 As Range
Lastrow = Cells(Rows.Count, "DU").End(xlUp).Row
Set MyRange = Sheets("FormulationsDatabase (2)").Range("DU1:DU" & Lastrow)
For Each c In MyRange
If Not UCase(c.Value) = UserForm7.ComboBox4.Text Then
If MyRange1 Is Nothing Then
Set MyRange1 = c.EntireRow
Else
Set MyRange1 = Union(MyRange1, c.EntireRow)
End If
End If
Next
If Not MyRange1 Is Nothing Then
MyRange1.Delete
End If
End If

End Sub
 
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
DCOUNT - date as a field only works when entered as a number jco Excel Worksheet Functions 9 November 11th 09 09:12 PM
Works on numbers but not on TEXT CLR Excel Programming 2 June 1st 07 06:45 PM
Automatic insert the last number in a list to another Excel works jons Excel Discussion (Misc queries) 1 November 2nd 06 07:17 PM
Calulating the number of days an employee works Curtis Excel Worksheet Functions 6 October 30th 06 09:43 AM
Userfrm Lookup Works For text not Number gregork Excel Programming 10 February 23rd 04 05:01 AM


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