+ Reply to Thread
Results 1 to 2 of 2

Macro to search ID number in sheet 1 and transfer quantity into sheet 2

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Macro to search ID number in sheet 1 and transfer quantity into sheet 2

    Hey there,
    I'm new to your forum and I just started to use Excel macros. I'm fascinated how much is possible in excel, I had no clue about! I was playing around with the recorder the last couple of days and tried some of the macros I found in your great forum so far. Now I want to start a little project on my own and don't really know how to solve the following problem:

    I have an Excel file with two sheets, the first one contains raw data. There are serial numbers in colum A and the quantity of those IDs in column C.
    On the second sheet I want to work with those data and have some of the serial numbers in column A (differen order) and the matching quantity in column D.

    Now I want to write a mocro that would start on top of column A (sheet 2) takes the serial number and searches for it in column A of sheet 1. If it finds the number I want it to write the matching quantity out of column c (sheet 1) into column D (sheet 2). If it doesn't find the number in the list I want it to write 0. and then do the same thing with the next serial number until the list on sheet 2 is over.

    I attached what I was able to do so far but I don't know how to make it proceed to the next row or give a 0 if it doesn't find the number.

    I would really apprechiate any help and even more if you could also explain a little so that I can learn from it.

    Thanks, Obgle!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Macro to search ID number in sheet 1 and transfer quantity into sheet 2

    YEA! I just figured out how to run that macro automatically whenever I open the Excel file!

    Sorry I was just so excited about that, for you guys it is probably really simple...

+ 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