+ Reply to Thread
Results 1 to 20 of 20

Create Macro, Userform or a searchbox to search data from table in excel in diff sheets

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Create Macro, Userform or a searchbox to search data from table in excel in diff sheets

    Hello,

    I'm trying to create a userform, macro or a search box in a seperate sheet in excel to find a list of data in one or more table in excel sheets.

    the table contains country, element, items and years so for example by searching a name of a country i want all information regarding that country to be shown same as items or year etc. i would really appreciate it if someone could tell me a code or function to do it in any 3 types of macro, userform or search box!

    Thanks

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    If Possible can u provide example sheet by attachment.

    Thanks - MNR.

  3. #3
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    yeah sure how can I attach an excel file here? there is option only for images to upload!

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    go to Managed Attachement in down to current page then fallow the steps ok

  5. #5
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Thanks I'll try it now

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    or else goto Go Advanced option down this reply box

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    That link i think of ur local desktop right tht will not work

  8. #8
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Here's an example of a table in a sheet and i want to have a macro or userform to search from this table or a search box in different sheet! thanks
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Particular Country name data u need in different sheets right in that same workbook right.

  10. #10
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    basically yes, for example if i search for the country all the info regarding the country name would be appear in a table same as if you search for an item or a year

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Hi Hanif,

    please have a look this attached file and let me know is it meet ur requirement or not .

    Thanks - Naveed.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Hi Naveed

    Thanks, You're star!! this is exactly what I need. could you please give me a brief description of what you've done! I can follow the codes you've assigned for macro and I was wondering should I do the same if I want it to search over more than one sheet and also to be able to search by different options. for example, instead of country search by items!

    Thanks again, you made my day
    Last edited by hanif; 11-12-2012 at 05:50 AM.

  13. #13
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Why not just use auto-filter? seems much more simple

  14. #14
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    because with auto filter i can only filter data from active sheet and also i need a search box to have option to search with different with different categories

  15. #15
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Can't you put all your data on one sheet? It makes things much easier

  16. #16
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    unfortunately they have to seperated

  17. #17
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Well why not copy them to one tab for searching? Will make it much easier, it's fairly easy to loop through all your sheets and append the data in each sheet to the bottom of another

  18. #18
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Hi Hanif,

    Thanks if u satisfied with the solution then don't forget to mark this Thread as SOLVED.

    Goto 1st Post - Goto Thread Tool - then Select Mark this thread as sloved.

    to know how i prepared then open the script page make the window short and press F8 slowly then u will come to know how that code was working.

    and one more thing Hanif see how much knowledge i have in excel, macro from that level i was prepared for u and SIR have more and more experience than me if possible follow his steps might b u will get better solution than me. try it.

    Thanks - Naveed.

  19. #19
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Thank mate,

    Yeah sure I will. I really appreciate your help!

    Thanks again - Hanif

  20. #20
    Registered User
    Join Date
    03-25-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Create Macro, Userform or a searchbox to search data from table in excel in diff sheet

    Hi Guys !

    I have a similar macro to set up like Hanif.

    My sheet is kind of a data base with all research & references documents (with hyperlinks to them). Table has 7 columns (B:H).
    I need the macros:

    1. Adding a new row to the table (just under the heading i.e. 'reports') but the new row can be added under different section (report, article, video, presentation, other). I managed done only report part and I stuck.

    2. Search box to search through the all table - After type i.e. 'parental influence' I want every row where that text appeared will be copied to the 'results' sheet and copied rows will keep the same format. Also I want a msg box to inform users "go to 'Results' sheet to look at your outcomes".

    Apologies if my explanation isn't clear. Hope my attachment explains everything!

    Many thanks!
    Magda
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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