Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
find largest values, then return corresponding row values. | Excel Discussion (Misc queries) | |||
Search/Filter to find values in another range based on two cell values | Excel Programming | |||
Copy values from file A, Find/Replace these values in File B | Excel Programming | |||
Predict Y-values on new X-values based on other actual X and Y values? | Excel Programming |