+ Reply to Thread
Results 1 to 6 of 6

Data search

  1. #1
    Registered User
    Join Date
    12-31-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2003
    Posts
    21

    Data search

    In a sheet I have data in 13 columns, each with their corresponding titles, from "A1" to "M1". Through a code search is made throughout the leaf, from the data entered in the InputBox. If found, copy Sheet2 all the rows where the search data are, as often as apareza it. I would like to modify this code so that:
    1 -. Searching only be done in the "G" column.
    2 - when copying (in Sheet2) of the rows where the data found,. Further in cell "C1" of that same sheet, I copy the data searched (the previously entered in the InputBox).

    The code I use is as follows:
    HTML Code: 
    thanks.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Data search

    Hi, Aretradeser,

    1 -. Searching only be done in the "G" column.
    Please Login or Register  to view this content.
    These commands search in the entire sheet due to using Cells. You might like to restrict it to be Column("G:G") in order to find the last row in Column G and omit uColumna as you restruct that to Column G
    Please Login or Register  to view this content.
    sets the range which should be modified to read
    Please Login or Register  to view this content.
    2 - when copying (in Sheet2) of the rows where the data found,. Further in cell "C1" of that same sheet, I copy the data searched (the previously entered in the InputBox).
    You must add another parameter to the Procedure containing the contents of the InputBox or make that a local/global variable in order to make the contents available for inserting into cells in another procedure.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Data search

    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    12-31-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Data search

    Thanks HaHoBe and bsalv. Both codes work well, but are incomplete. Foul copy the code that allows the cell "C1", the data to search for the entered in the InputBox.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Data search

    Hi, Aretradeser,

    Foul copy the code that allows the cell "C1", the data to search for the entered in the InputBox.
    If you didnīt change the procedure as suggested itīs what I would the result to be like.

    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    12-31-2013
    Location
    Madrid, Spain
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Data search

    I have not understood anything.
    thanks

+ 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. Match data and find data following search several search criterias
    By maxtymo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2013, 08:18 PM
  2. Search Box to Search and Display Data
    By kimhan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2013, 08:11 PM
  3. [SOLVED] type in a search tab and search the data in another tab(and Delete)
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2013, 09:27 AM
  4. [SOLVED] Match search terms, and add data in next column. Multi search problem.
    By Wales MB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2013, 06:10 PM
  5. search header name and match data in row and hight light unmatch data in colour
    By shrinivasmj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 07:22 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