+ 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
    77

    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
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    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.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

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

    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, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    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
    77

    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)

Similar Threads

  1. Link a single page with input data to a spread sheet
    By tahoejohno in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2016, 04:59 PM
  2. Replies: 0
    Last Post: 01-19-2015, 03:31 PM
  3. Need a macro to export data from a spread sheet to word
    By stillkicking111 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2014, 12:22 AM
  4. Macro to check data from Word documents against an excel spread sheet
    By xxgirlinbluexx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2013, 01:25 PM
  5. Replies: 5
    Last Post: 06-23-2009, 12:16 PM
  6. can I clean old excel data format with macro on funny spread sheet
    By Todd F. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-22-2005, 05:05 PM
  7. how do i design/ implement a spread sheet to input live data
    By plimpler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2005, 04: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