+ Reply to Thread
Results 1 to 3 of 3

Need to merge a lot of daily reports

Hybrid View

  1. #1
    Registered User
    Join Date
    03-19-2013
    Location
    Copenhagen, DK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need to merge a lot of daily reports

    Hi

    I'm completely new to VBA programming.
    Here is my problem:
    I need to be able to sort in a lot of reports. I sort by name and date, which is input by the user.
    So for example the user marks a name from a dropdown list that matches the reports name. Then the user inputs all the dates wanted in the first column. Then to the right of this column all the relevant data is extracted.

    Hope this makes sense. So far I'm able to extract a single value from a report and now I'm trying to loop through each input date.


    Dim ADAV As Range, i As Integer
    Dat = 0
    
    For i = 6 To 10 'I just choosed some range to see if it would work
    Dat = Cells(i, 1) 'This reads the different dates 
    Nam = Cells(1, 5) 'This reads the name of the report, which doesn't change over time
    s = "='F:\VESS\[DDATO.xls]Ark1'!E$13" 'The reports placement 
    
    s = Replace(s, "VESS", Nam)
    s = Replace(s, "DATO", Dat) 'Replacing in the string
    For j = 6 To 10
    Cells(j + 1, 2).Formula = s 'Not working, but I want to get the data from the file out in the corresponding cells, next to the date assigned
    Next j
    Next i

    I hope this makes sense to you. Furthermore i apologize for my bad coding, but I'm am just breaking into it.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Need to merge a lot of daily reports

    Do you have a sample file that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-19-2013
    Location
    Copenhagen, DK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need to merge a lot of daily reports

    Hi

    Thanks for the reply.
    I'm not able to upload the documents i'm currently working at, so i made two documents which highlights what I need.
    First there is a typical report. I receive this on a daily basis from different projects. This contains information about specific duties and the time used.
    I need to transfer this data into the other document called "overview".
    By now I have made a code that will transfer a single cells value, but I would like to make a loop work, so the macro fills out the entire sheet.
    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)

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