Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default does not work when i use 1000

I have a this code but as soon as i enter numers in the thousandes it doesnt
work properly.

Sub VolumeFilter()
If (UserForm7.TextBox5.Value = "" And UserForm7.TextBox6.Value = "") Then
Exit Sub

If UserForm7.TextBox6.Value = "" Then
UserForm7.TextBox6.Value = UserForm7.TextBox5.Value
End If

If UserForm7.TextBox5.Value = "" Then
UserForm7.TextBox5.Value = UserForm7.TextBox6.Value
End If


Dim MyRange, MyRange1 As Range
lastrow = Cells(Rows.Count, "DW").End(xlUp).Row
Set MyRange = Sheets("FormulationsDatabase (2)").Range("DW1:DW" & lastrow)
For Each c In MyRange
If Not (UCase(c.Value) = UserForm7.TextBox5.Value And UCase(c.Value) <=
UserForm7.TextBox6.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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default does not work when i use 1000

See my other post regarding Val'ing the text value.

--
__________________________________
HTH

Bob

"Miree" wrote in message
...
I have a this code but as soon as i enter numers in the thousandes it
doesnt
work properly.

Sub VolumeFilter()
If (UserForm7.TextBox5.Value = "" And UserForm7.TextBox6.Value = "") Then
Exit Sub

If UserForm7.TextBox6.Value = "" Then
UserForm7.TextBox6.Value = UserForm7.TextBox5.Value
End If

If UserForm7.TextBox5.Value = "" Then
UserForm7.TextBox5.Value = UserForm7.TextBox6.Value
End If


Dim MyRange, MyRange1 As Range
lastrow = Cells(Rows.Count, "DW").End(xlUp).Row
Set MyRange = Sheets("FormulationsDatabase (2)").Range("DW1:DW" & lastrow)
For Each c In MyRange
If Not (UCase(c.Value) = UserForm7.TextBox5.Value And UCase(c.Value) <=
UserForm7.TextBox6.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



Reply
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
1000-200*4% add deepak Excel Discussion (Misc queries) 2 June 26th 07 08:31 AM
IF B11 is less than 1000, enter 0 in D11, IF B11 is between... BearlyCat Excel Worksheet Functions 4 February 24th 07 07:16 PM
1000 to 1 and 1 to 1000 Olle Excel Worksheet Functions 5 October 6th 06 02:41 PM
1000+$K$5/1000 -what does $ indicate in formula Coolbhims Excel Worksheet Functions 1 March 16th 06 11:51 AM
Event ID 1000 LtLeary Excel Programming 0 October 5th 05 11:18 PM


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