Closed Thread
Results 1 to 8 of 8

Macro to search the entire work book for a specific number Updated at 14:06

  1. #1
    Registered User
    Join Date
    04-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Macro to search the entire work book for a specific number Updated at 14:06

    I want excel to create a unique identifying number in cell "k1" every time I copy or add a worksheet.

    I would prefer it be between 18001 and 18999
    Last edited by frankday; 08-06-2018 at 05:06 PM.

  2. #2
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    7,443

    Re: Macro to search the entire work book for a specific number

    Not Understood.

    Why not have a userform or input box that runs on double click or if you press ctrl and f?


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 08-06-2018 at 03:01 PM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  3. #3
    Registered User
    Join Date
    04-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Macro to search the entire work book for a specific number

    If I have S/N 61413464 on one of the WS in my WB, I want to key in that number someplace and have it go right to that number. It could be on any of 100 WS. I just don't know how to make that happen. I am open to any suggestion.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    17,959

    Re: Macro to search the entire work book for a specific number

    the post #2 will do that for you. If you are unsure how to use it, then

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  5. #5
    Registered User
    Join Date
    04-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Macro to search the entire work book for a specific number Updated at 14:06

    Your option above pulls up the find box but then you have to go into options and check "entire workbooK" I was looking for a way that automatically searches the entire workbook. Something more user friendly for my employees.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    17,959

    Re: Macro to search the entire work book for a specific number Updated at 14:06

    Please upload a sample workbook with a several sheets and some sample serial numbers. In this manner, we can test code and ensure it works as you have requested. I have looked at the code in Post #2 and it looks like it should work. Seeing a representative sample of your actual workbook will ensure this.

  7. #7
    Registered User
    Join Date
    04-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Macro to search the entire work book for a specific number Updated at 14:06

    Attached is a sample of what I am working on.

    Thanks again for your time.
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    40,667

    Re: Macro to search the entire work book for a specific number Updated at 14:06

    Duplicate of this thread: https://www.excelforum.com/excel-gen...d-14-14-a.html

    Duplicate closed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need someone to edit Modify Macro's to work on entire work book
    By MarkKil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2018, 01:01 AM
  2. macro to search entire work book and do Index match with 2 criteria
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2016, 11:52 AM
  3. Highlighting duplicate values across an entire work book.
    By PenguinYeltz in forum Excel General
    Replies: 3
    Last Post: 10-24-2016, 09:09 AM
  4. (F9) VBA code to recalculate entire work-book
    By domgilberto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2016, 06:31 AM
  5. Reference an entire worksheet within a work book?
    By sgillispie in forum Excel General
    Replies: 5
    Last Post: 03-09-2012, 01:14 PM
  6. Assign List to Entire Work Book
    By rajeshp1983 in forum Excel General
    Replies: 1
    Last Post: 02-11-2011, 02:04 AM
  7. [SOLVED] Page Breaks for Entire Work Book
    By Steve in forum Excel General
    Replies: 2
    Last Post: 07-12-2005, 07:05 PM

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