Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks a lot !
-- Learning "Dave Peterson" wrote: Maybe... Option Explicit Sub testme() Dim myStr As String Dim HowMany As Long Dim myRng As Range myStr = InputBox(Prompt:="For what would you like to search?") If myStr = "" Then Exit Sub End If With Worksheets("somesheetnamehere") Set myRng = .Range("L:L") End With HowMany = Application.CountIf(myRng, myStr) MsgBox "I found " & HowMany & " " & myStr & "'s" End Sub tracktraining wrote: Hi All, I am wondering if there is a way to use the user input as a search criteria? Example: a message appear for the user "what would you like to search?", then use that word in the following code : = countif (L:L, "[user search word]"). thanks, tracktraining. -- Learning -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How get user input that can then be used in formula, as criteria? | Excel Worksheet Functions | |||
Input one criteria to search in 5 fields | Excel Discussion (Misc queries) | |||
User form search criteria example | Excel Programming | |||
Excel VBA- Get user input, search the for match, output to text file | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |