+ Reply to Thread
Results 1 to 9 of 9

Automation help

  1. #1
    Registered User
    Join Date
    03-08-2015
    Location
    Retford
    MS-Off Ver
    2011
    Posts
    10

    Automation help

    Hi, i am a complete newbie to any type of macros or automation

    The task i would like to do is in the attached file, basically its this.

    The first 5 sheets are data from specific sites and volumes, the last sheet is a table whereby i would like it to extract the information from the first 5 sheets and compile it into the table in the relevant format. i can do formula to do the first row of data but how do i get it to step down to the next row and populate the table exactly the same but with the relevant data...

    The data is from supermarkets and the store numbers are sites...essentially its the same formula but repeated 500 times by row?

    In the final tab, the rest of the information is built with basic formula to auto calculate when data is entered to the formatted table

    Make any sense at all...thanks for your help, much appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Automation help

    It's not really automation, but instead just a complex formula:

    D3:

    =SUMPRODUCT((INDIRECT("'" & $C3 & "'!C3:I3")=D$2)*(INDIRECT("'" & $C3 & "'!C5:I509"))) and copy down and over

    This dynamically inserts the tab names from C3:C7 into the formula and then calculates their respective data. Did you want to adjust this for certain stores only?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    03-08-2015
    Location
    Retford
    MS-Off Ver
    2011
    Posts
    10

    Re: Automation help

    Thanks,

    I would need store 1 to calculate for all tabs and insert into the table, then store 2, 3, 4, 5 etc to the bottom in a different table....appreciate your help!

    The attached shows how i would need it to format. Data is copied and pasted from store 1 for all tabs to the table to show the end result


    Jamesxls.xlsx
    Last edited by jamesw6810; 08-06-2015 at 02:05 PM.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Automation help

    What do you mean by saved down? Do you want to copy B2:J27 somewhere else?

  5. #5
    Registered User
    Join Date
    03-08-2015
    Location
    Retford
    MS-Off Ver
    2011
    Posts
    10

    Re: Automation help

    Sorry, my explanation is rubbish.

    The table in the "Table" Tab would be a host for the data to be calculated by store and inserted into. I would then need that saving to be able to view the table by store once all have been calculated. The end game is to populate the table for each store based on the days and areas "grocery" etc. The ability to have this stored and emailed to each store is the end game? Hope that is clearer

    If you take a look at the data in the table, this represents the data from store 1 in all tabs..i need it to calculate this for all stores and create a table for each.

  6. #6
    Registered User
    Join Date
    03-08-2015
    Location
    Retford
    MS-Off Ver
    2011
    Posts
    10

    Re: Automation help

    ok so i have got the formula above to work for store 1....works perfect, now the question is: How do i get this to do exactly the same for store 2 onwards...the formula i adapted is


    =SUMPRODUCT((INDIRECT("'" & $C3 & "'!C3:I3")=D$2)*(INDIRECT("'" & $C3 & "'!c$5:i5")))

  7. #7
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Automation help

    Hi

    Use index indirect match.

    Add number store Cell C2? You can change number 1 to 600.

    D3
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy down and cross

    See the file.
    Attached Files Attached Files
    Last edited by micope21; 08-07-2015 at 03:04 AM.
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  8. #8
    Registered User
    Join Date
    03-08-2015
    Location
    Retford
    MS-Off Ver
    2011
    Posts
    10

    Re: Automation help

    Awesome thanks. I now need to attach each table to an email sender. The email addresses only differ by store number so: store1@xxx.co.uk -store2@xxx.co.uk and so on. Is this possible in this format?

    Many thanks again

  9. #9
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Automation help

    Yes it can be done by using VBA?

    I'm not expert on VBA, only basic VBA?

    Best is click solved this thread by this (Click Thread Tools above your first post, select "Mark your thread as Solved".)

    Start new Thread in VBA, not General.

    All the best

+ 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. Web Automation
    By shivu98 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 09-22-2014, 07:53 AM
  2. VBA Automation
    By xxx87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2014, 04:41 AM
  3. [SOLVED] Please help with IE automation by VBA
    By vpnvipin in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-09-2013, 09:07 AM
  4. IE Automation
    By hodpy62 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2009, 01:10 PM
  5. Automation help!
    By vicco in forum Excel General
    Replies: 2
    Last Post: 05-16-2008, 05:18 PM
  6. Automation.
    By kymbo46 in forum Excel General
    Replies: 3
    Last Post: 04-16-2007, 08:32 AM
  7. VBA for Automation
    By joone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2007, 02:06 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