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 Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    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.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  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, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    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
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  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, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    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
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,476

    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!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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. [SOLVED] 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. 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