How To Automate Part 1


Published on

A reference manual, on how to automate your work, from end to end.

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

How To Automate Part 1

  1. 1. How to Automate your work
  2. 2. <ul><ul><li>This presentation will give the knowledge of what Excel and Access can do to automate your procedures. </li></ul></ul><ul><ul><li>The examples should illustrate all the different tricks I use to get data automated. </li></ul></ul><ul><ul><li>Hopefully, the ease of use and time savings, will give you the willingness to try. </li></ul></ul><ul><ul><li>Some names and numbers are blanked out to ensure security of the data. </li></ul></ul>
  3. 3. 3 requirements <ul><li>There are only three things you need, to automate your jobs. </li></ul><ul><ul><li>Knowledge of the data you are trying to automate. </li></ul></ul><ul><ul><li>Knowledge of Microsoft products (Excel and Access). </li></ul></ul><ul><ul><li>A willingness to take the time to try something new. </li></ul></ul><ul><li>You already know the ins and outs of your data. You deal with the data every day/week/month. </li></ul><ul><ul><li>That leaves number 2 & 3. </li></ul></ul><ul><ul><li>This presentation will attempt to deliver 2 &3. </li></ul></ul>
  4. 4. Reason why to automate <ul><li>5 of my projects will be used as reasons why to automate your jobs. </li></ul><ul><ul><li>One of my 1 st large automation projects (at Inergy) was my Journal Entries. </li></ul></ul><ul><ul><li>These were hand typed from Payroll PDF reports. </li></ul></ul><ul><ul><ul><li>They were typed into 3 spreadsheets that balanced the data (or were suppose to) and broke the data into a journal entry format. </li></ul></ul></ul><ul><ul><ul><li>The pain was in the data entry and it would take days to do. </li></ul></ul></ul><ul><ul><ul><li>The process was changed to 15 minutes with simple pivot tables and formulas. </li></ul></ul></ul><ul><ul><ul><li>6 months later, that 15 minutes was reduced to a minute. </li></ul></ul></ul><ul><ul><li>Would like to change days worth of work into minutes? </li></ul></ul>
  5. 5. Reason why to automate <ul><ul><li>Pivot tables are used for most any question/problem that is presented. </li></ul></ul><ul><ul><ul><li>These are updated through zero or little effort. </li></ul></ul></ul><ul><ul><ul><li>The only time spent is on the set-up. </li></ul></ul></ul><ul><ul><ul><ul><li>The set-up may take up to two days to do. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>But, If your normal process time was a day each month and that was reduced to 10 minutes, then your saving a ton of time. </li></ul></ul></ul></ul><ul><ul><ul><li>If you do get stumped with a question or find a new problem. </li></ul></ul></ul><ul><ul><ul><ul><li>Establish an automated procedure, so you can answer or avoid that problem in the future. </li></ul></ul></ul></ul>
  6. 7. Before After
  7. 8. Methods
  8. 9. 5 methods <ul><li>This presentation will use 5 methods (not necessarily in this order) to create automated processes. </li></ul><ul><li>Create or connect to a data source </li></ul><ul><li>Create Access queries to manipulate data </li></ul><ul><li>Create Pivot Tables </li></ul><ul><li>Create formulas to get data in shape </li></ul><ul><li>Create Macros for the excel grunt work </li></ul>
  9. 10. <ul><li>These 5 methods will be illustrated with 5 examples. </li></ul><ul><li>The 1 st four will be broken out by method. </li></ul><ul><li>The 5th one will be illustrated from start to finish and with user documentation. </li></ul><ul><ul><li>NetConsole Spreadsheet </li></ul></ul><ul><ul><li>Lambda Spreadsheet </li></ul></ul><ul><ul><li>YTD 401(k) audit spreadsheet </li></ul></ul><ul><ul><li>Journal Entry spreadsheet </li></ul></ul><ul><ul><li>Anderson Hourly Wage spreadsheet </li></ul></ul>
  10. 11. Example Spreadsheets
  11. 12. NetConsole <ul><li>The goal of the NetConsole spreadsheet is to pay Overtime and Personal leave hours. </li></ul><ul><li>A separate process is needed, due to NetConsole design flaws. </li></ul><ul><li>The previous method took 3-4 hours and was prone to error. </li></ul><ul><li>The new method takes 5 minutes and is easily verified. </li></ul><ul><li>This process involves 4 of the methods; Data source, Access queries, Pivot tables and formulas. </li></ul>
  12. 13. NetConsole workflow
  13. 14. NetConsole <ul><li>The final product is this file uploaded into ADP. </li></ul>
  14. 15. Lambda <ul><li>The goal of the Lambda spreadsheet is to track Lambda project hours by employee and code. </li></ul><ul><li>The data source is eTIME, the primary output of data is PDFs. </li></ul><ul><ul><li>eTIME offers an excel file but it is not user friendly. </li></ul></ul><ul><ul><ul><li>The challenge is to get the excel data into a correct format for calculation. </li></ul></ul></ul><ul><li>This data was previously not available before this spreadsheet. </li></ul><ul><ul><li>If it were to be done manually, it would take hours of data entry each week. </li></ul></ul><ul><ul><li>It now takes a minute to update each week. </li></ul></ul><ul><li>This process involves 4 methods; Data source, pivot tables, formulas and macro. </li></ul>
  15. 16. Lambda workflow
  16. 17. Lambda <ul><li>The results are pivot tables that illustrate the hours by employee per month. </li></ul>
  17. 18. YTD 401(k) spreadsheet <ul><li>The goal of the 410(k)spreadsheet is to audit the 401(k) values going to MassMutual. </li></ul><ul><li>This is an instant audit, that will automatically tell the user if there is a problem. </li></ul><ul><li>The method before this, would take days to complete and the analysis was not instant. </li></ul><ul><li>This takes a minute or two each pay period to update. </li></ul><ul><ul><li>If a problem is found, the data is at your finger tips to find the employees involved. </li></ul></ul><ul><li>This process involves 4 methods; Data source, Access queries, pivot tables and formulas. </li></ul>
  18. 19. YTD 401(k) spreadsheet workflow
  19. 20. YTD 401(k) spreadsheet <ul><li>Result is several pivot tables with quick balances and the ability to find the source of problems. </li></ul>
  20. 21. Journal Entry <ul><li>The goal of the JE spreadsheet is to create balanced Journal Entries for MFGPro. </li></ul><ul><ul><li>Also be able to easily troubleshoot problems down to the employee level. </li></ul></ul><ul><li>This was a major headache of mine when I started at Inergy and was my 1st major automation project. </li></ul><ul><li>The method before this, would take days to complete and the errors were hard to figure out. </li></ul><ul><li>This takes a couple of minutes each pay period to update. </li></ul><ul><li>This process involves 4 methods; Data source, Access queries, pivot tables and formulas. </li></ul>
  21. 22. Journal Entry workflow
  22. 23. Journal Entry <ul><li>The result is several pivot tables populating an easy upload to MFGpro. </li></ul>
  23. 24. Hourly Raises <ul><li>The goal of the Hourly Raise spreadsheet is to create a employee raise file that can be uploaded into ADP. </li></ul><ul><li>This was a very simple and quick project. </li></ul><ul><ul><li>It took more time to document then to set up. </li></ul></ul><ul><li>Once again this process takes minutes, compared to an hour of manual work. </li></ul><ul><li>This process involves all 5 methods; Data source, Access queries, pivot tables, formulas and macro. </li></ul>
  24. 25. Hourly Raises
  25. 26. Hourly Raises <ul><li>The result is an easy interface to create raises. </li></ul>
  26. 27. Create or connect to a data source
  27. 28. Create or connect to a data source <ul><li>This is the initial stage of getting the data and the start of not having to do any data entry. </li></ul><ul><li>You need to establish where the data is located and how many different methods are there to retrieve the data. </li></ul><ul><ul><li>The way you get the data dictates any future manipulation. </li></ul></ul><ul><li>The important thing is that you get the data and don’t settle for printing reports. </li></ul>
  28. 29. Create or connect to a data source <ul><li>The first question you have to answers is; Where is it located (how do I get it)? </li></ul><ul><ul><li>A connection to the database source. </li></ul></ul><ul><ul><ul><li>An example of this would be an ODBC connection via Access or Excel. This is an active link that is reading tables from the software. </li></ul></ul></ul><ul><ul><li>An Excel report from the software. </li></ul></ul><ul><ul><li>An text file from the software. </li></ul></ul><ul><li>These are the common sources of data and the start of the process. </li></ul>
  29. 30. Access linked tables
  30. 31. ODBC Connection <ul><li>A 100% automated process requires a direct link into the data source. </li></ul><ul><ul><li>This means that there are no reports to run or data to be moved. </li></ul></ul><ul><ul><li>The routine of running reports and copying/pasting or having employees type in data is replaced by this method. </li></ul></ul><ul><li>You can link into some software (I’ll illustrate the process with ADP) </li></ul><ul><ul><li>Select data from one table or select several tables and link them in queries. </li></ul></ul><ul><ul><li>This can be done in both Access and Excel. </li></ul></ul>
  31. 32. Walkthrough for Access ODBC Connection
  32. 33. Access ODBC Connection <ul><li>Open Access </li></ul><ul><li>Goto </li></ul><ul><ul><li>Get External Data </li></ul></ul><ul><ul><li>Link Tables </li></ul></ul>
  33. 34. Access ODBC Connection <ul><li>Goto </li></ul><ul><ul><li>Files of Type </li></ul></ul><ul><ul><li>ODBC </li></ul></ul>
  34. 35. Access ODBC Connection <ul><li>Select your Data Source </li></ul><ul><ul><li>Mine was ADP </li></ul></ul>
  35. 36. Access ODBC Connection <ul><li>Enter your User Name and Password </li></ul><ul><ul><li>Some data sources may require different requirements </li></ul></ul>
  36. 37. Access ODBC Connection <ul><li>Most sources have multiple tables to choose from </li></ul><ul><li>Trial and error will dictate which table(s) you need to select. </li></ul><ul><ul><li>I selected an employee table because I needed certain HR information from it. </li></ul></ul>
  37. 38. Access ODBC Connection <ul><li>The table is now linked into the source and contains real time data. </li></ul><ul><li>You never need to open the table. </li></ul><ul><ul><li>You probably shouldn’t open it, due to the amount of data it is linked to (it may take awhile). </li></ul></ul><ul><li>The query will narrow the data towards just what you need. </li></ul>
  38. 39. Journal Entry Sources linked into Access JE Example
  39. 40. JE link <ul><li>For my JE spreadsheets I have linked in several tables, for the different types of data that I need. </li></ul><ul><li>This database is used for several smaller spreadsheets or for one time pivot tables. </li></ul><ul><li>The negative with linked in tables, is they tend to be slower than copied in data. </li></ul><ul><ul><li>The advantage of not having to run a reports usually outweighs the negative. </li></ul></ul>
  40. 41. JE link <ul><li>Some of my JE data needs can be pulled directly from my linked in tables. </li></ul><ul><li>The more complex data (taken from multiple tables or filtered) need to be merged into one data set (a query). </li></ul><ul><li>This will be discussed in the query section. </li></ul>
  41. 42. JE link <ul><li>Upon opening, the data from the access linked tables/queries automatically update the JE spreadsheet. </li></ul><ul><li>This done via a prompt upon opening </li></ul><ul><ul><li>Select Enable automatic refresh </li></ul></ul>
  42. 43. JE link <ul><li>This new data can be selected by changing the dates on the pivot tables. </li></ul>
  43. 44. JE link <ul><li>Formulas then read the pivot table data and the numbers can be balanced </li></ul><ul><li>The formulas are reading the summed data on each of the tabs based on what account/cost center needs to be updated. </li></ul>
  44. 45. JE link <ul><li>Formulas are also being populated on the CIM load tab. </li></ul><ul><ul><li>This tab gets loaded into MFGPro and creates my Journal entries. </li></ul></ul>
  45. 46. Tables linked into Excel
  46. 47. Excel ODBC Connection <ul><li>The same table connection into Access can be done in Excel. </li></ul><ul><li>If you need one table and do not need manipulation data, then Excel is a better option than Access. </li></ul><ul><li>If any formulas need to be added, they can be done via the pivot table calculations (discussed in a later section). </li></ul><ul><li>This method is used for simple pivot tables, with one source of data. </li></ul><ul><ul><li>Whenever data is needed, opening of the spreadsheet will result in real time data directly linked to the source. </li></ul></ul>
  47. 48. Excel ODBC Connection <ul><li>Open a blank excel document </li></ul><ul><li>Goto </li></ul><ul><ul><li>Data </li></ul></ul><ul><ul><li>PivotTable and PivotChart Report </li></ul></ul>
  48. 49. Excel ODBC Connection <ul><li>Click on External data source </li></ul><ul><li>Click on Next </li></ul>
  49. 50. Excel ODBC Connection <ul><li>Click on Get Data </li></ul>
  50. 51. Excel ODBC Connection <ul><li>Select your data source </li></ul>
  51. 52. Excel ODBC Connection <ul><li>Type in your password </li></ul>
  52. 53. Excel ODBC Connection <ul><li>Select your table </li></ul><ul><li>Move all or individual headers </li></ul><ul><ul><li>I usually move all and then select the ones I need on the pivot table. </li></ul></ul><ul><li>Select Next </li></ul>
  53. 54. Excel ODBC Connection <ul><li>Select Next </li></ul>
  54. 55. Excel ODBC Connection <ul><li>Select Next </li></ul>
  55. 56. Excel ODBC Connection <ul><li>Select Finish </li></ul>
  56. 57. Excel ODBC Connection <ul><li>Select Next </li></ul>
  57. 58. Excel ODBC Connection <ul><li>Select Layout </li></ul>
  58. 59. Excel ODBC Connection <ul><li>Drag and drop headers into the pivot table areas. </li></ul><ul><li>Click OK </li></ul>
  59. 60. Excel ODBC Connection <ul><li>Click Finish </li></ul>
  60. 61. Excel ODBC Connection <ul><li>A default table will be displayed with the criteria from the layout. </li></ul>
  61. 62. Excel ODBC Connection <ul><li>Right click on the body of the table. </li></ul><ul><li>Select Table Options </li></ul>
  62. 63. Excel ODBC Connection <ul><li>Click on Refresh on Open. </li></ul><ul><li>This will bring up an option (upon opening the spreadsheet) to refresh the pivot table data. </li></ul><ul><li>This connection is great because you just open the spreadsheet and allow the data to update. </li></ul><ul><ul><li>Any formulas or analysis pieces will automatically be done. </li></ul></ul>
  63. 64. Excel based reports (copy/paste)
  64. 65. Excel base reports <ul><li>Most of the time you will not be able to link into a data source. </li></ul><ul><ul><li>A lot of software locks you out or requires a fee to access their data. </li></ul></ul><ul><ul><li>IT may not want access to their databases. </li></ul></ul><ul><li>The second best method for data sourcing is running reports in an excel format. </li></ul>
  65. 66. Excel base reports <ul><li>Once you have data in excel you have a lot of choices. </li></ul><ul><ul><li>Add the data to an Access database, which keeps large amounts of data and can manipulate and disperse it via queries to pivot tables. </li></ul></ul><ul><ul><li>Copy into a tab that updates formulas/pivot tables. </li></ul></ul><ul><li>Some of the problems encountered in this method is getting the data into a database readable format. </li></ul><ul><li>The remaining 4 methods are used to get the data into shape. </li></ul><ul><ul><li>Access Tables/Queries </li></ul></ul><ul><ul><li>Pivot tables </li></ul></ul><ul><ul><li>Formulas </li></ul></ul><ul><ul><li>Macros </li></ul></ul>
  66. 67. YTD 401(k) Data Source
  67. 68. 401(k) data source <ul><li>Access Database, populated by Excel reports, are used to update the pivot tables for the 401(k) audit spreadsheet. </li></ul><ul><li>This same database is also used to update several other spreadsheets with similar audits (payroll/HR) or some just for information purposes. </li></ul><ul><ul><li>When questions are asked, the opening of this spreadsheets quickly provides the information requested. </li></ul></ul><ul><ul><li>This can also find problems and fix them quickly with automated audits. </li></ul></ul>
  68. 69. 401(k) data source <ul><li>ADP has a 3 rd party product called ReportSmith. </li></ul><ul><li>This product is used to run the reports I need for my Access database. </li></ul><ul><li>Each reports run has a corresponding table in Access. </li></ul><ul><li>The process has needs 8 reports run each pay period and a copy and paste of them into the database. </li></ul><ul><ul><li>The process takes about 5 minutes but the database feeds 15+ spreadsheets, that will update automatically upon opening. </li></ul></ul>
  69. 70. 401(k) data source <ul><li>This report contains all of the earning codes (per paycheck) and other information I need for my pivot tables. </li></ul><ul><li>If you are running a report that is going to be put into Access and feed queries. </li></ul><ul><ul><li>You need to make sure you have all of the needed common dominators. </li></ul></ul><ul><ul><ul><li>In this case the following are needed; name, file #, check date, check number, dept, distribution #. </li></ul></ul></ul>
  70. 71. 401(k) data source <ul><li>Highlight the data </li></ul><ul><li>Select Copy </li></ul>
  71. 72. 401(k) data source <ul><li>Open the database </li></ul><ul><li>Open the corresponding table </li></ul>
  72. 73. 401(k) data source <ul><li>Click on </li></ul><ul><ul><li>Edit </li></ul></ul><ul><ul><li>Paste Append </li></ul></ul><ul><li>Once it is paste appended, on all of the tables, then all of the data has YTD information. </li></ul><ul><li>The disadvantage (compared to direct links) is the time involved in updating the tables. </li></ul><ul><li>The advantage is in the speed of the queries and the update time of the pivot tables. </li></ul>
  73. 74. 401(k) data source <ul><li>The updated tables feed all of my queries. </li></ul>
  74. 75. 401(k) data source <ul><li>The tables and the queries feed the pivot tables. </li></ul>
  75. 76. Lambda source data
  76. 77. Lambda data <ul><li>If there are not multiple sources of data and the data won’t exceed 65K rows (Excels limit) then an Access database is not needed. </li></ul><ul><li>This spreadsheet was made for Debbie Simpkins and is updated each week for her. </li></ul><ul><li>These are very simple pivots tables and with no calculations being feed to them. </li></ul><ul><li>The problem is the data. </li></ul><ul><ul><li>It took a massive macro and out of the norm IF statements to get the data in a readable format for the pivot table. </li></ul></ul><ul><ul><li>Once the setup was over, it was a very easy spreadsheet to maintain. </li></ul></ul><ul><ul><li>I also learned a ton making the macro, which I can use on other projects. </li></ul></ul>
  77. 78. Time Detail Report <ul><li>In eTIME (timekeeping system for Adrian) all reports are defaulted to PDF. </li></ul><ul><li>If you want an excel file, you can only get it emailed. </li></ul>
  78. 79. Emailed spreadsheet <ul><li>There are a lot of merged cells and it is not in a format that allows calculations. </li></ul><ul><ul><li>A macro is used with formulas to get the data into a correct format </li></ul></ul>
  79. 80. Emailed spreadsheet <ul><li>The data is copied and pasted into the Time Detail Dump tab on the Lambda spreadsheet. </li></ul>
  80. 81. Macro <ul><li>A macro button is pushed and it narrows the data down and gets it into a format for the formulas. </li></ul>
  81. 82. Formulas <ul><li>There area a series of formulas to get the data into 4 categories; </li></ul><ul><ul><li>Dept # (92009908 & 11009910) </li></ul></ul><ul><ul><li>Hours </li></ul></ul><ul><ul><li>Date </li></ul></ul><ul><ul><li>Name </li></ul></ul><ul><li>This is start of a series of IF statements. </li></ul>
  82. 83. Formulas <ul><li>This IF statement is used a lot. </li></ul><ul><ul><li>It looks for a “,”, which would means a name is being used. If it isn’t there it looks at the row above it to get the last name used. </li></ul></ul><ul><ul><li>This is used because the data does not come in a name per each row format. </li></ul></ul><ul><ul><li>It needs to be there for the “filter and delete” portion of the macro. The names would be lost with out it. </li></ul></ul><ul><ul><li>It eventually updates the pivot tables (when the macro completes). </li></ul></ul>
  83. 84. Macro <ul><li>Once the macro is completed (should take a minute) it will finish on the Chart 2 tab </li></ul><ul><li>Now the data can be analyzed on the pivot table/charts. </li></ul>
  84. 85. Linking Excel worksheets into Access
  85. 86. Linking Excel into Access <ul><li>Sometime your source data may reside in Excel but you still need Access to manipulate the data. </li></ul><ul><li>In that case Linking the data from Excel into an Access table would work. </li></ul><ul><ul><li>This works just like a link to an other data source. </li></ul></ul><ul><li>Example; Say you had 10 spreadsheets just like Lambda and you need to merge them into one. </li></ul><ul><ul><li>You would link in all the tables and create a Union Query of the tables (that merges them together) </li></ul></ul><ul><ul><li>Then you would link a excel pivot table to that query, so you could view all the data at once, in real-time, with no effort. </li></ul></ul>
  86. 87. Linking Excel into Access <ul><li>To link excel worksheets into Access, go to; </li></ul><ul><li>File </li></ul><ul><li>Get External Data </li></ul><ul><li>Link Tables </li></ul>
  87. 88. Linking Excel into Access <ul><li>Change file type to Excel. </li></ul><ul><li>Navigate to your spreadsheet. </li></ul><ul><li>Select Link </li></ul>
  88. 89. Linking Excel into Access Select the worksheet
  89. 90. Linking Excel into Access Make sure the checkbox is checked.
  90. 91. Linking Excel into Access Hit finish and it is linked in. It will update each time the excel spreadsheet is saved.