+ Reply to Thread
Results 1 to 5 of 5

Excel search engine help

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    somerset
    MS-Off Ver
    Excel 2007
    Posts
    5

    Excel search engine help

    Hi all new to this site very helpful it has been, im using 2007 created a data sheet so i can enter data into column a,b,c,d and have made a searh engine to search for results, the problem im having is it only searches the column A SO IT GIVES ME THE LAST ENTRY OF WHAT I AM SEARCHING FOR, I NEED IT TO SEARCH COLUMN B as well to give me the result of C & D here is the code on the search button i need another string of commands to make it search B can anyone help thanks Martin

    Private Sub CommandButton1_Click()
    row_number = 0
    Do
    DoEvents
    row_number = row_number + 1
    item_in_review = Sheets("PartsData").Range("A" & row_number)
    If item_in_review = TextBox1.Text Then
    TextBox2.Text = Sheets("PartsData").Range("B" & row_number)
    TextBox3.Text = Sheets("PartsData").Range("c" & row_number)
    TextBox4.Text = Sheets("PartsData").Range("D" & row_number)
    End If


    Loop Until item_in_review = ""

    End Sub

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Excel search engine help

    You have an if statement. If item_in_review = TextBox1.Text Then It looks like this is not true so the other columns won't be read.

    Chris

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    somerset
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel search engine help

    Hi thanks, so what would you suggest I do im very new to excel so could do with as much help as poss thks for your time.

  4. #4
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Excel search engine help

    Try deleting the "If item_in_review = TextBox1.Text Then" and the "End if"
    Try it before you save the workbook with the same name.

    It looks like it is just stopping you doing what you want it to, but it could be there for a reason of which I'm unaware.

    Chris

  5. #5
    Registered User
    Join Date
    08-15-2013
    Location
    somerset
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel search engine help

    Hi tried that didnt work get no results in box3/4

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. search engine in excel
    By ejlersen in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-14-2013, 06:23 AM
  2. Search Engine in Excel
    By lorenzoscott78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2012, 11:21 PM
  3. Developing Search Engine to search several Excel sheets
    By cruiser102 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2009, 09:30 AM
  4. search engine in excel
    By Mrrobinson in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 06-29-2008, 10:23 PM
  5. [SOLVED] Search engine in excel
    By Howard in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-08-2005, 10:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1