+ Reply to Thread
Results 1 to 9 of 9

Macro - Lookup ID In Various Sheets Before Recording Data

  1. #1
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Question Macro - Lookup ID In Various Sheets Before Recording Data

    Hi

    I have a macro that records data into another sheet in one column based on the ID number - works great
    ..however now I want the macro to search ID columns in three different worksheets - tried to adjust the code but keep getting errors!!! - Is this even possilble??


    Below is an example of the code, thanks!
    Please Login or Register  to view this content.
    Last edited by sgp; 01-18-2012 at 10:34 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    1. do you have any other sheets in the same wokbook than thos you will search in?
    2. If answer to wuestion 1 is yes then provide the exact names of the 3 sheets you want to search
    Regards,
    Khaled Elshaer
    www.BIMcentre.com

    Remember To Do the Following....
    1. Thank those who have helped you by clicking the Star below their post.
    2. Mark your post SOLVED if it has been answered satisfactorily:
    • Select Thread Tools (on top of your 1st post)
    • Select Mark this thread as Solved

  3. #3
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Yes that's correct.
    Worksheet names are 'Minor', 'Major' and 'Direct' - I do have more worksheet but only need the macro to search in these worksheets.

    Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    I can't figure out what your code does.
    Anyway the below loop should contain the code that you want to run on every sheet

    Please Login or Register  to view this content.
    Sorry but unless you describe exactly what you want and attach a file (if possible) then that's the most I can do.

  5. #5
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Thanks for you help..I tried out the code but didn't quiet work, i've attached an example - hope it makes sense! Thanks again.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Any ideas?

  7. #7
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Use this

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Red face Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Thanks - Just what I was looking for

    However, how would I be able to code out if the details contained in different column other than one column - attached example thanks for your help!!!!

    Will mark as solved

  9. #9
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Macro - Lookup ID In Various Sheets Before Recording Data

    Example attached here!!
    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)

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