+ Reply to Thread
Results 1 to 5 of 5

How to pull data from a sheet into a format in another sheet using VBA?

  1. #1
    Registered User
    Join Date
    07-23-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    How to pull data from a sheet into a format in another sheet using VBA?

    Hello everyone!

    I need help with the following scenario.

    I have the following sales invoice format in one sheet ("Sheet1") where I record my sale of items and the data get posted in another sheet ("Sheet2").
    Invoice format.jpg

    Lets say I have made 10 number of sales so far and the item details are recorded in Sheet2 as shown in the picture below:
    Sales.jpg

    Now based on the invoice number I want to pull the item records (Item name and their quantity) from Sheet2 back into the invoice format sheet ("Sheet1") in their designated place.
    As shown in the second picture, for Invoice no. 1, for example, I have sold Items 2, 3 and 10 and based on the invoice number I want the sales invoice format ("Sheet1") to populate only the items that I had sold for that particular invoice number as shown in the picture below:
    Result.jpg

    How do I do this in VBA?
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: How to pull data from a sheet into a format in another sheet using VBA?

    Nice Pictures.
    I, for one am not going to make a workbook with all your info so it can be tested.
    I have such an idea that most people won't
    So, you might have to attach a workbook with sufficient data so it can be tested.

    After you transfer data to Sheet2 for invoice 1, do you want invoice 2 to just overwrite invoice 1, Does not seem logical but you don't say where the next invoice should go.
    Think things thru before posting please.

    Are any of the numbers results from formulae? Or were the zeros (0) entered manually?
    Last edited by jolivanes; 07-23-2019 at 05:03 PM.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: How to pull data from a sheet into a format in another sheet using VBA?

    Change attached as required
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-23-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    Re: How to pull data from a sheet into a format in another sheet using VBA?

    Hi, I am very sorry instead of attaching the workbook, a picture got attached. But I am also thankful for the solution that you gave me. I think I can make it work now.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: How to pull data from a sheet into a format in another sheet using VBA?

    No problem.
    If you run into any snags, just let us know.
    Good Luck

+ 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. Formula to pull data from one sheet to a new sheet based on date range
    By lisajolley11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2015, 08:38 PM
  2. pull data from two sheet and paste into master sheet with desired column's only
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2014, 03:39 AM
  3. Replies: 0
    Last Post: 05-21-2013, 03:09 PM
  4. Pull data from a specific sheet that matches cell value on Input Sheet
    By vaciaravino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2012, 08:38 PM
  5. Replies: 4
    Last Post: 09-05-2012, 05:57 PM
  6. Replies: 4
    Last Post: 08-29-2012, 10:32 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