+ Reply to Thread
Results 1 to 5 of 5

macro to input corresponding data into a spread sheet

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    66

    macro to input corresponding data into a spread sheet

    Hi

    I have a spread sheet with data in column D (reference) and column E (quantity).
    These changes regularly.

    I would like a macro that will populate the quantity column into a second spreadsheet that has a corresponding reference number. This has column G as reference and column H as quantity. Please see attached spreadsheet as it perhaps explain my problem better and it shows the expected results.

    Could you please let me know how to achieve this with a macro?

    Thanks
    Hossein
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    333

    Re: macro to input corresponding data into a spread sheet

    Hi

    You don't need macro.
    On Sheet2 type into B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and drag it down as needed.
    Check attached file.
    Attached Files Attached Files
    Happy with my answer * Add Reputation.

  3. #3
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: macro to input corresponding data into a spread sheet

    Hi Kokosek

    I do need a macro as the information keep changing all the time. i.e. new quantities are generated and then it will need to be populated into the 2nd spreadsheet. And once this is done then the contents of 1st table are deleted and ready for the next batch of data. This happens a few times a day.

    Therefore I need a macro that will copy the quantity into the corresponding 2nd table.

    Thanks.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    4,275

    Re: macro to input corresponding data into a spread sheet

    Code for macro. Macro transfer data from sheet1 to sheet2 and then deletes all data in sheet1 (D & E)
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 02-14-2019 at 11:32 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: macro to input corresponding data into a spread sheet

    Hello kvsrinivasamurthy

    Thank you for your reply - this is great. Can I ask for a minor change in your code please? Sheet2 is in another spreadsheet, could you change your code to reflect this please?
    Sheet1 is in Q:\prod\test1.xlsm location and sheet2 is in q:\sap\test2.xlsm location.

    Sorry should have made this more clear.

    Thanks.

+ 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