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 If statements

Although it is a text box it will be numbers entered

"Bob Phillips" wrote:

Less than or more than with text?

--
__________________________________
HTH

Bob

"Miree" wrote in message
...
I have the following code, i need to alter it now for some other user
inputs
I know i need to change the line
If UCase(c.Value) < UserForm7.TextBox1.Value Then
I need to be able to put , less than one text box and more than another(if
possible ignoring an empty box)
Also if possible i need to just look in the cell to see if it partially
contains what is is text box

Thank you

Sub TSRFilter()
Dim MyRange, MyRange1 As Range
lastrow = Cells(Rows.Count, "DL").End(xlUp).Row
Set MyRange = Sheets("FormulationsDatabase (2)").Range("DL1:DL" & lastrow)
For Each c In MyRange
If UCase(c.Value) < UserForm7.TextBox1.Value 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 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
If statements Tiffany Excel Worksheet Functions 2 January 26th 10 07:18 AM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
using IF THEN statements [email protected] Excel Discussion (Misc queries) 3 October 17th 06 04:52 PM
If... Then statements BaldySlaphead Excel Discussion (Misc queries) 1 March 21st 06 11:53 AM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


All times are GMT +1. The time now is 04:14 PM.

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"