+ Reply to Thread
Results 1 to 14 of 14

VBA Macro to collect data

  1. #1
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    VBA Macro to collect data

    Dear forummembers,

    Sameone can create a macro for my excel file:

    As i have 3 tabs: denemarken, engeland, finland
    These are datas for 1 day

    Now i want to collect these data in the data tab for many days.

    Can sameone create a macro that all those 3 tabs goes to the data tab.
    These 3 tabs change evryday but i want those datas in one big overview for many days.

    Sameone can create a macro inside the data tab?
    Thanks in advance,

    Jeroen Dijkwel
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA Macro to collect data

    You could copy all the data from each sheet using UsedRange, from your post its unclear what you want to do.

    From the post it sounds like you want to copy all 3 sheets data to one sheet. I'd record a macro of you doing this, then view the code for the best place to start.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    These 3 tabs, Engeland,Finland and denmark i want to collect these 3 temperatures into one data tab.
    For now its only mentioned for 1 day but i want these data into one tab for more days then one.

    So is there a way that the data is collecting into one data tab. Or i need to cntrl c and cntrl v these data evryday ?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Macro to collect data

    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    Tja daar wordt geen zinnig antwoord opgegeven

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Macro to collect data

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Macro to collect data

    Please Login or Register  to view this content.
    You are on an englisch forum, so please respond in english.

  8. #8
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    Dear oeldere,

    I understand the macro now. but it only records for one day.
    I want these seperate dates in one big data tab.
    Now it only copy's the 3 data tabs for one day. And he is not collecting this information
    Last edited by jeroendijkwel; 06-30-2014 at 06:01 AM.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Macro to collect data

    each day is a differant file?

  10. #10
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    No, This tab engeland finland and denmark changes evryday.
    These tabs are forwarded by email.

    But i want these records in one big tab(summary)
    So when i click on the macro he is collecting these data in the summary tab.

    Also can you create that he takes the date =Today()
    to seperate these data in dates.

    And it is not neccesary to copy Onderverdeling cellen Gewenste opslag temperatuur Kritische opslag temperatuur Afwijking (werkelijke temperatuur) Oorzaak afwijking Actie
    Only the first collum needs that + mentioned with copied data.

    Its needs to look like this:

    Date:30-06-2014
    Onderverdeling cellen Gewenste opslag temperatuur Kritische opslag temperatuur Afwijking (werkelijke temperatuur) Oorzaak afwijking Actie
    data
    data
    data
    data
    etc


    So now tomorrow these temperatures has changed and i will adjust them into the file engeland,finland,denmark
    Then i click again on the macro and it will copy the cells with the new date
    date: 31-06-2014
    Onderverdeling cellen Gewenste opslag temperatuur Kritische opslag temperatuur Afwijking (werkelijke temperatuur) Oorzaak afwijking Actie
    data
    data
    data
    data
    etc.

    hope's this makes it clear.
    Last edited by jeroendijkwel; 06-30-2014 at 06:16 AM.

  11. #11
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    It needs to look this this:
    ub Macro7()
    '
    ' Macro7 Macro
    '

    '
    Sheets("Denemarken").Select
    Range("A4:G4").Select
    Selection.Copy
    Sheets("Summary").Select
    ActiveSheet.Paste
    Range("A2").Select
    Sheets("Denemarken").Select
    Range("A10:G56").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Summary").Select
    ActiveSheet.Paste
    Sheets("Engeland").Select
    Range("A10:G29").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Summary").Select
    ActiveWindow.SmallScroll Down:=12
    Range("A49").Select
    ActiveSheet.Paste
    Sheets("Finland").Select
    ActiveWindow.SmallScroll Down:=-9
    Range("A10:G57").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Summary").Select
    ActiveWindow.SmallScroll Down:=30
    Range("A69").Select
    ActiveSheet.Paste
    Range("H69").Select
    ActiveWindow.SmallScroll Down:=33
    End Sub

    But now he needs to seperate these dates under each other and not subsitute

  12. #12
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    It needs to look this this:
    ub Macro7()
    '
    ' Macro7 Macro
    '

    '
    Sheets#"Denemarken"##Select
    Range#"A4:G4"##Select
    Selection#Copy
    Sheets#"Summary"##Select
    ActiveSheet#Paste
    Range#"A2"##Select
    Sheets#"Denemarken"##Select
    Range#"A10:G56"##Select
    Application#CutCopyMode = False
    Selection#Copy
    Sheets#"Summary"##Select
    ActiveSheet#Paste
    Sheets#"Engeland"##Select
    Range#"A10:G29"##Select
    Application#CutCopyMode = False
    Selection#Copy
    Sheets#"Summary"##Select
    ActiveWindow#SmallScroll Down:=12
    Range#"A49"##Select
    ActiveSheet#Paste
    Sheets#"Finland"##Select
    ActiveWindow#SmallScroll Down:=-9
    Range#"A10:G57"##Select
    Application#CutCopyMode = False
    Selection#Copy
    Sheets#"Summary"##Select
    ActiveWindow#SmallScroll Down:=30
    Range#"A69"##Select
    ActiveSheet#Paste
    Range#"H69"##Select
    ActiveWindow#SmallScroll Down:=33
    End Sub

    But now he needs to seperate these dates under each other and not subsitute

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Macro to collect data

    @Jeroendijkwel

    Please use tag # around your code.


    Please Login or Register  to view this content.
    This date doesn't exist

  14. #14
    Registered User
    Join Date
    06-30-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: VBA Macro to collect data

    ok 01-07-2014 then, but can you adjust this macro wich you made for me.
    because i dont understand to adjust this one..

    I hope it is clear what i mentioned in my latest posts how it should look like when i run the macro !

+ 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. Macro to collect data and show answer
    By ivylodge in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2013, 12:52 PM
  2. Macro to collect YTD data. I think I have most of it . . .
    By lsteinbach in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-07-2013, 04:26 AM
  3. Macro to collect data in another worksheet
    By J.McGreary in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2011, 06:54 AM
  4. macro to collect data
    By source4 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-29-2008, 02:45 AM
  5. Collect data - Macro
    By dannyboy213 in forum Excel General
    Replies: 1
    Last Post: 09-20-2006, 03:26 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