Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default to find values between two values?

Hi,

I"m trying to build a search module in excel in which the user ca
define an minimum value and an maximum value to search for.
So I created a form with two textboxes for each category the user ca
search in. Now I already know how to make VBA find the absolute valu
of a textbox, I am using this code:

Dim d1 as integer
d1 = textbox2.text

If TextBox2.Value = True Then
Set c = Worksheets(Categorie.Value).Columns("D").Find(d1
ActiveCell, xlFormulas, _
xlPart, xlByColumns, xlNext, MatchCase:=False)
If Not c Is Nothing Then
c.Activate
Set c = Worksheets(Categorie.Value).Columns("D").FindNext( c)
End If
Else: Set c = Nothing
End If

But I want d1 to be the minimum value to search for and another valu
to be a maximum (this would be d2). When the user has defined these tw
values I want to module to search for values between these two values.
So if a user wants to search for values between 300 and 400 fo
example, the module should activate every cell in column D (I hav
other if-codes for other columns) containing a value between 300 an
400.

How should I do this?

Pee

--
Message posted from http://www.ExcelForum.com

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
find values in multiple cells and paste row values izzyt1972 Excel Discussion (Misc queries) 5 December 26th 07 10:14 PM
find largest values, then return corresponding row values. neurotypical Excel Discussion (Misc queries) 7 May 24th 06 10:27 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM
Copy values from file A, Find/Replace these values in File B shockley Excel Programming 1 September 22nd 03 12:32 AM
Predict Y-values on new X-values based on other actual X and Y values? NorTor Excel Programming 2 August 10th 03 03:08 PM


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