none
Using the search feature RRS feed

  • Question

  • Im working in excel I spread where I would like to add a textbox to use it as a search feature.

    I would to be able text in the box whatever Im searching for in column A which is my product  or column E which is my location

    I ve looked online and havent found any full code that would be help.

    Thank for help in advance

    Friday, August 1, 2014 8:55 PM

Answers

  • Hi,

    According to your description, I think you want to put a text box into the worksheet to create a searching feature. Since there is a build-in Find feature to do a search in Excel, I'm not sure about how you want to show the result after searching. Highlight, activate the cell or copy the record to a new worksheet?

    In fact, we can use Range.Find method to find specific information in a range. You could also record a macro to help you learn to write a VBA code.

    In addition, to enter a data to search the related records in a worksheet, we can resort to VLookup Function to dynamically search table arrays instead of creating a VBA macro. You could learn more details about it from the link below.

    Using the VLookup Function in Excel 2007

    Since I'm not sure about your detail requirement, if all above cannot help you, please feel free to let me know with more details.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 8, 2014 8:09 AM
    Moderator

All replies

  • Hi

    See link below. It's a sample file, you will need to download the file because macros don't work on "ONE DRIVE"

    Hope that helps.

    https://onedrive.live.com/?cid=3A2C42285A53958A&id=3A2C42285A53958A%21318&authkey=%21AOLw5jwOVj7Z0Gg


    Cimjet




    • Edited by Cimjet Sunday, August 3, 2014 10:44 PM
    Friday, August 1, 2014 11:58 PM
  • Create Search Function

    Mark Cell E4 as the search box and enter the search text in cell E4. Believing the data list is in Column A, Run the code below. You can also place a button on the sheet and Assign the macro to the button.

    Sub TextSearch()

    Dim Cnt,LRow as Long

    Lrow=Range("A65000").End(xlup).row

    For Cnt=0 to Lrow

    If Range("A"& Cnt).value= Range("E2").value then

    Range("A"& Cnt).color=RGB(255,0,0)

    Msgbox "Match found",Vbokonly+vbinformation,"Search Result"

    End if

    Next Cnt

    End Sub


    Ankur Chakravarty Hyderabad

    Saturday, August 2, 2014 12:08 PM
  • Thank you for your help. what I need help understand is

    Column A is Size,   Column B is MFG which manufacture , Column C is Model, Column D is # for the Trend Depth,

    Column E is Tire location, Column F is Sale.

    What I'm trying to understand how does your formula fit into what you have here.

    Monday, August 4, 2014 7:15 PM
  • I want to be able to search using the tire size or the location only
    Monday, August 4, 2014 7:16 PM
  • Hi

    Can you see the sample file at the link above, on my first post.


    Cimjet

    Monday, August 4, 2014 7:59 PM
  • Sorry the link dose not work for some reason. It take me into my msn drive one which is a part of my online outlook
    Monday, August 4, 2014 9:18 PM
  • Hi

    Try this one:

    http://cjoint.com/?3HfaRr2gwRO  or this one:

    http://dropcanvas.com/u5ylf

    I'm having problems with "One Drive"


    Cimjet


    • Edited by Cimjet Tuesday, August 5, 2014 1:57 AM
    Monday, August 4, 2014 10:46 PM
  • Hi

    Did you get the file and is it good for you or do you need further assistance.


    Cimjet

    Tuesday, August 5, 2014 10:22 PM
  • Hi,

    According to your description, I think you want to put a text box into the worksheet to create a searching feature. Since there is a build-in Find feature to do a search in Excel, I'm not sure about how you want to show the result after searching. Highlight, activate the cell or copy the record to a new worksheet?

    In fact, we can use Range.Find method to find specific information in a range. You could also record a macro to help you learn to write a VBA code.

    In addition, to enter a data to search the related records in a worksheet, we can resort to VLookup Function to dynamically search table arrays instead of creating a VBA macro. You could learn more details about it from the link below.

    Using the VLookup Function in Excel 2007

    Since I'm not sure about your detail requirement, if all above cannot help you, please feel free to let me know with more details.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 8, 2014 8:09 AM
    Moderator