Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Lazzzx
Thanks a lot, now it work "Lazzzx" wrote: Hi, The result from the inputbox is stored in the fin variable. Yous should replace [H14].value with "fin" and it should work perfect. ActiveSheet.Range("$A$15:$n$500 ").AutoFilter Field:=1, Criteria1:="=*" & fin & "*" if you have a changing number of rows in your database, you can make it more dynamic by: ActiveSheet.Range("$A$15).CurrentRegion.AutoFilter Field:=1, Criteria1:="=*" & fin & "*" this will only work, if you have no empty rows in your data. Furthermore range("A14:N14) shoud be empty cells to avoid these to be included into the currentregion. br Lazzzx "inès" skrev i meddelelsen ... Hello I would like to use an input box to find in my excel data base some information. I have been able to create the input box and the vba code to find a word or the sentence but if i put both together it doesn't work anymore. Could you please help me. The code which i have create is as follow: Sub Find() Dim rangeCel As Range Dim compt As Integer Dim fin As String fin = Application.InputBox(Prompt:="KUNDE", Type:=2) ActiveSheet.Range("$A$15:$n$500 ").AutoFilter Field:=1, Criteria1:="=*" & [H14].Value & "*" End Sub Thanks a lot Inès |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |