+ Reply to Thread
Results 1 to 1 of 1

Macro for copying data from one sheet to another under different cases?

  1. #1
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    47

    Macro for copying data from one sheet to another under different cases?

    Is it possible to create a macro for this?
    So with the help of people from this forum, i managed to create a program as what i have in the attached file. I'm now able to attach a file and get the data from there, i am also now allowed to search for the name and it will be pasted to a separate sheet. what im having problem with now is that the layout of the reference file.

    In case 1, i have a layer for total expenses, the amount to be subtracted and the additionals, all with different headers as shown. i want to get only the totals of each column.
    In case 2, i have a layer for total expenses and additionals but they are under the same header. only the amount to be subtracted is separated. I want to get the value of additional and total expenses separately
    In case 3, all are total expenses but they are under different headers. I want to get the sum of all the Totals.

    All the date i will get will be pasted on the sheet where i'm running the vba.

    I'm thinking of a nested if, or should I search for the "Total" string then move one column then get that data or...? Also, the number of rows are not constant per type (expenses, additional etc)

    Any help?
    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. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM
  2. Replies: 1
    Last Post: 12-03-2013, 04:19 AM
  3. Macro for copying the data from one sheet and insert the same in next sheet
    By Thinker8 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2013, 05:51 PM
  4. [SOLVED] Macro for copying data from one column in sheet 2 based on two criterias in sheet 1
    By baardings in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2012, 01:50 PM
  5. Loop to read data from sheet and run all cases
    By khanumair50 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2009, 08:21 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