+ Reply to Thread
Results 1 to 7 of 7

Need a macro to search for the data located in another sheet

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Need a macro to search for the data located in another sheet

    I have 2 sheets

    First one has the source ISBN numbers for books. It is only 1 column say column A and say 40 rows

    The second sheet is the destination sheet where macro supposed to look for the data located on A2 on the source file in the destination sheet.

    Once it locates this value in the destination sheet it supposed to move 2 columns to the right and add "1" to the end of the text in this cell.

    Since there are several rows(40) I guess it needs to be loop.

    Please help

    Thanks

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need a macro to search for the data located in another sheet

    couldnt if(countif>0) not work?

    if not supply sample data
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Re: Need a macro to search for the data located in another sheet

    nmdgfsdfsdfsdfd
    Last edited by misterno; 05-25-2015 at 09:41 PM.

  4. #4
    Registered User
    Join Date
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Re: Need a macro to search for the data located in another sheet

    Below is the source file where all data is located in the A column. Macro supposed to pick each cell one by one and look it up in the following file named destaination file

    source file.JPG

    below is the destination file where macro supposed to look up for the value located in A1 of the previous file, then move 2 columns right and add "1" at the end of the text in the cell.

    I guess I need a loop because there are more than 40 values in the first file

    destination file.JPG

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need a macro to search for the data located in another sheet

    still looks like you can achieve this with normal vlookup formula

  6. #6
    Registered User
    Join Date
    02-09-2013
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    84

    Re: Need a macro to search for the data located in another sheet

    Quote Originally Posted by humdingaling View Post
    still looks like you can achieve this with normal vlookup formula
    But there are more than 40 values in the source data

    You don't expect me to have 40 vlookups do you?

    I don't know how to do loops

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need a macro to search for the data located in another sheet

    still not sure why you think it is so complicated you require loops to achieve what you are doing
    unless your data setup isnt how i imagine you would set things up but to avoid misinterpretation Attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    ps even if you require loops you would need to provide sample workbook in order for some one to advise you how to code it

+ 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. Replies: 2
    Last Post: 03-20-2014, 10:28 AM
  2. Adding data to a dropdown box that is located on another sheet in another file.
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2012, 09:27 AM
  3. Replies: 2
    Last Post: 03-26-2012, 07:12 PM
  4. button corresponding with macro located on different sheet than data
    By buckfran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2009, 05:01 PM
  5. Macro to search the sheet name and copy and paste the data from a major sheet
    By salma2009 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2009, 02:11 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