+ Reply to Thread
Results 1 to 5 of 5

VBA to compile different sheets with different headers

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    86

    VBA to compile different sheets with different headers

    Need some help here.

    I have two sheets: 1. GL download 2. AP download
    There are different number of columns for each sheet.
    Some of the columns do overlap.
    I want to compile the data into one sheet. I do not want to sum. I want the VBA to pull in each row.

    For example, GL download tab has following headers:
    Date
    Description
    Amount

    AP download has the following headers:
    Date
    Description
    AP Amount

    I want the third sheet to pull in Date, Description and Amount from GL Download and AP Amount from AP Download into the same column.

    Can this be done?

    I know it'd be easier to just rename the column. But to complicate things a little, there are different number of columns in GL and AP download and they're in different order too.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to compile different sheets with different headers

    I had to assume on a lot of things. Submitting a workbook would have made it easier to code correctly.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: VBA to compile different sheets with different headers

    stnkynts,

    apologies for not attaching a file. i should have known better.
    i'm attaching a file now though.
    the third sheet, "consolidated" has the desired output from the macro.

    note 1: the gl download and the ap download have different columns (i.e. data)
    so when the macro pulls data from the ap download sheet, i expect some of the columns to be blank because I don't want/need all of them. and i'm ok with that.

    note 2: our AP system, has details that the GL system does not have. but only items that are posted on the AP system. For example, if you look on gl download sheet and look at column J, some of the sources are "Payables" (3 items) These 3 items are found on the AP download sheet. When the macro consolidates, I want it to exclude these rows from the GL download sheet. And pull in the data from the AP download sheet. Otherwise I'd be double-counting.

    I think I over-simplified this request in my original thread.
    As I'm writing this, I'm realizing this is a pretty tall order.
    Let me know if this is possible.

    Thanks so much!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to compile different sheets with different headers

    Anything is possible but yeah, this seems like quite a project. I can't see an easy way to accomplish what you want to accomplish (truthfully I am confused about what you need). Maybe someone else on here might be able to see what I cannot. Best of luck.

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: VBA to compile different sheets with different headers

    hey stnkynts, i agree...anything is possible. thanks for your prompt feedback.
    i am replying in hopes that you or someone else will see this and have an idea on how to approach this.
    i agree, that my explanation of what i need may not be clear. so let me explain it this way:

    i work in finance, and every month i download financial information from the general ledger.
    the information posted to the general ledger can come from one of several sources.
    if the source is "payables", then i can log into a different system and get further details. details that are not available in the general ledger. such as invoice number, vendor, etc.
    in order to get a consolidated view, i have to 1) delete the information from the general ledger with source "payables" 2) add ALL the information from the payables module. if i don't do this i'd be double-counting. in theory, what i delete and add equal in amount. and it does, i always check this before i do.
    i normally do the cut and paste one column at a time because the column headers between general ledger and the payables module do not line up.

    the process doesn't take too long, i was just wondering if there was a macro to automate this process

    thanks again!

+ 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] comparing headers of 2 sheets
    By dcmb in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-02-2014, 11:01 PM
  2. compile Data across sheets
    By mitchry09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-02-2013, 01:53 PM
  3. Compile Multiple Sheets
    By bitterepiphany in forum Excel General
    Replies: 1
    Last Post: 08-16-2010, 04:09 PM
  4. compile a list from 7 sheets into 1
    By bshelman in forum Excel General
    Replies: 10
    Last Post: 05-31-2008, 12:01 PM
  5. Compile Different sheets in one sheet
    By Bijan1231 in forum Excel General
    Replies: 1
    Last Post: 01-24-2006, 02:35 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