+ Reply to Thread
Results 1 to 7 of 7

How to pull data into other columns when row #'s change between reports

  1. #1
    Registered User
    Join Date
    06-27-2019
    Location
    U.S.
    MS-Off Ver
    Office 16
    Posts
    3

    How to pull data into other columns when row #'s change between reports

    book1.JPG
    book2.JPG

    Kind of lost on writing this macro, as I just began a few weeks ago. book1 and book2 images attached, and also workbook also attached to explain the below:

    Sheet1 has customer information, including customer name, #, and all the related documents (invoice/payment info). The Customer ID and Customer Name are only at the heading of the information, and I need it to be pulled into each row to be included with the documents (invoice/payment info). However, the number of documents can change on a weekly basis, therefore, changing what rows all the data is on.

    Basically, I need Sheet1 to end up looking like Sheet1(2). As previously stated, the number of rows per customer can change weekly, etc.

    Is this even possible?
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to pull data into other columns when row #'s change between reports

    You can use Power Query to normalise the data from your source file:

    Please Login or Register  to view this content.
    Change filepath / name and worksheet name to suit.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: How to pull data into other columns when row #'s change between reports

    VBA
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-27-2019
    Location
    U.S.
    MS-Off Ver
    Office 16
    Posts
    3

    Re: How to pull data into other columns when row #'s change between reports

    Thanks Jindon, that works like a beauty. I do have one final thing I'm struggling with on this macro, and it will be completed. I need macro to calculate the Percentage of Total lines:

    sheet4.JPG

    Each "Percentage of Total" line needs to calculate the percentage of the Grand Total. For example, row 4 (columns G-L), needs to calculate =G3/G33, or =H3/H33, and so forth. However, as previously stated, the company totals, percentage of totals and grand totals' row numbers will change every time I run my report. The final "Percentage of Total" line located on row 34, is just calculating the percentage of the total (i.e. =G33/L33, or =H33/L33, etc.)

    I have already used conditional formatting macro to format the percentage of total rows to 0.00% format.

    Attached is excel workbook as well (see Sheet4)
    Attached Files Attached Files
    Last edited by AliGW; 07-03-2019 at 09:18 AM. Reason: Please don't quote unnecessarily!

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: How to pull data into other columns when row #'s change between reports

    Try
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-27-2019
    Location
    U.S.
    MS-Off Ver
    Office 16
    Posts
    3

    Re: How to pull data into other columns when row #'s change between reports

    Last edited by AliGW; 07-03-2019 at 09:17 AM. Reason: Please don't quote unnecessarily!

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: How to pull data into other columns when row #'s change between reports

    Don't quote full post unless you really need it to do, the forum doesn't like it.

    No way to look at your attachment.

    No error at all.
    Attached Files Attached Files

+ 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. [SOLVED] Pull-data-from-a-closed-workbook Format change VBA
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2017, 08:55 AM
  2. [SOLVED] Pull data from one tab to another (but change how it's displayed)
    By bkarhu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-10-2014, 11:36 AM
  3. Please Help - Summary/Reports (Multiple columns calculation into different reports)
    By funguy757 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-17-2014, 12:50 PM
  4. Excel Reports - Using pull downs for multiple categories
    By davidingilbert in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-09-2014, 01:58 PM
  5. [SOLVED] Query to pull out change and replace data
    By lengwer in forum Access Tables & Databases
    Replies: 3
    Last Post: 08-29-2013, 01:42 PM
  6. Pull Data from Multiple Columns Based On Data Validation List Selection
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2013, 11:41 PM
  7. Change the data set your Vlookup's pull from Via a drop box
    By transition in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-27-2013, 06:19 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