├── .editorconfig
├── .gitignore
├── LICENSE
├── README.md
├── _config.yml
├── docs
├── PDF-Guides
│ ├── EssentialVBATerms.pdf
│ ├── ExternalLinkErrors.pdf
│ ├── M#ReferenceGuide.pdf
│ ├── MagicTricksForDataWizards-V2
│ │ ├── Chapter1-MergeTables
│ │ │ ├── MergeTables-Finished.xlsx
│ │ │ └── MergeTables-Start.xlsx
│ │ ├── Chapter2-Grouping
│ │ │ ├── Grouping-Finished.xlsx
│ │ │ └── Grouping-Start.xlsx
│ │ ├── Chapter3-CombiningFilesfromFolder
│ │ │ ├── Chapter3-CombiningFilesfromFolder.xlsx
│ │ │ ├── FilesFromFolder.pbix
│ │ │ └── SalesReports
│ │ │ │ ├── 01-January-Copy.xlsx
│ │ │ │ ├── 01-January.xlsx
│ │ │ │ ├── 02-February.xlsx
│ │ │ │ ├── 03-March.xlsx
│ │ │ │ ├── 04-April.xlsx
│ │ │ │ ├── 05-May.xlsx
│ │ │ │ └── 06-June.xlsx
│ │ ├── Chapter4-DynamicCalendarTable
│ │ │ ├── DynamicCalendarTable-Finished.pbix
│ │ │ └── DynamicCalendarTable-Finished.xlsx
│ │ ├── Chapter5-TimeIntelligence
│ │ │ ├── TimeIntelligence-Finished.xlsx
│ │ │ └── TimeIntelligence-Start.xlsx
│ │ ├── Chapter6-WorkingwithSegments
│ │ │ ├── CreatingSegments-Finished.xlsx
│ │ │ └── CreatingSegments-Start.xlsx
│ │ ├── Magic-Tricks-for-Data-Wizards.pdf
│ │ └── Magic-Tricks-for-Data-Wizardsv201802.pdf
│ ├── Pasting-Data-Types.pdf
│ ├── PowerBICheatSheet.pdf
│ ├── VBA-21Questions.pdf
│ ├── VBA-Cells&Ranges.pdf
│ ├── VBA-CheatSheet.docx
│ ├── VBA-CompleteGuide.pdf
│ ├── VBA-DeleteSheet.html
│ ├── VBA-ErrorHandling.pdf
│ ├── VBA-Intro.pdf
│ ├── VBA-ObjectModel.pdf
│ ├── VBA-PivotTableGuide.pdf
│ ├── VBA-PivotTables.pdf
│ ├── VBA-Pivots.pdf
│ ├── VBA-R1C1Notation.pdf
│ ├── VBA-Tutorial1.pdf
│ ├── VBA-Variables.pdf
│ ├── VBA-Workbook.pdf
│ └── VBA-Worksheet.pdf
├── PowerQuery
│ ├── Queries
│ │ ├── CareerOneStop.pq
│ │ ├── DynamicDateTable.pq
│ │ ├── EpochDateTable.pq
│ │ ├── ImportPDF.pq
│ │ ├── Index.pq
│ │ ├── IndexCreator.pq
│ │ ├── ParamTables.pq
│ │ ├── Swapi.pq
│ │ └── iexQuery.pq
│ ├── QueryWorkbooks
│ │ ├── GithubEventsQuery.xlsx
│ │ ├── ParameterTables.xlsx
│ │ ├── SAC-1.0.0.xlsx
│ │ ├── SportsRadar.xlsx
│ │ ├── SwapiAPI.xlsx
│ │ └── index.xlsx
│ └── README.md
├── ScriptLab
│ ├── BasicApiCall.js
│ ├── GitHubStars.js
│ └── ImportJsonData.js
├── Shortcuts&Formulas
│ ├── Buyer-Shortcuts.pdf
│ ├── Excel-Formulas.pdf
│ ├── Excel-Functions.xlsx
│ ├── Excel-Shortcuts.xlsx
│ ├── OneNote-Shortcuts.pdf
│ └── Windows-7-Keyboard-Shortcuts.pdf
├── SuperchargeExcel
│ ├── SuperchargeBI.dax
│ ├── SuperchargeExcel.md
│ └── readme.md
├── Templates
│ ├── Excel Customizations.exportedUI
│ ├── PERSONAL-2020-07.xlsb
│ ├── PERSONAL.xlsb
│ └── excel_customizations.exportedUI
├── VBA
│ ├── MacroWorkbooks
│ │ ├── ExcelLocationMacro.xlsm
│ │ ├── GetWbFileInfo.xlsm
│ │ ├── HyperlinkFileList.xlsm
│ │ ├── JobURLMacro.xlsm
│ │ ├── Lynda-Learning-Excel2016_MacrosInDepth
│ │ │ ├── Chapter01
│ │ │ │ ├── Introduction-after recording.xlsm
│ │ │ │ ├── Introduction.xlsm
│ │ │ │ ├── Large Macro ExampIe.xlsm
│ │ │ │ └── Profits.xlsx
│ │ │ ├── Chapter02
│ │ │ │ ├── Phone List.xlsm
│ │ │ │ ├── Playback_Button.xlsm
│ │ │ │ └── Playback_Ribbon.xlsm
│ │ │ ├── Chapter03
│ │ │ │ ├── UsefulMacros.xlsm
│ │ │ │ └── WorkbookWithMacros.xlsm
│ │ │ ├── Chapter04
│ │ │ │ ├── AddCode.xlsm
│ │ │ │ └── WatchCode.xlsm
│ │ │ ├── Chapter05
│ │ │ │ ├── DoLoops.xlsm
│ │ │ │ ├── Interactive.xlsm
│ │ │ │ ├── MailingLists-2.xlsx
│ │ │ │ └── MailingLists.xlsx
│ │ │ ├── Chapter06
│ │ │ │ ├── Final.xlsm
│ │ │ │ ├── Partial-2.xlsm
│ │ │ │ ├── Partial-3.xlsm
│ │ │ │ ├── Partial-4.xlsm
│ │ │ │ ├── Partial-5.xlsm
│ │ │ │ ├── Partial-6.xlsm
│ │ │ │ ├── Partial.xlsx
│ │ │ │ └── Scoping.xlsx
│ │ │ └── Chapter07
│ │ │ │ └── UsefulMacros.xlsm
│ │ ├── MacroWorkbook.xlsm
│ │ ├── OneNote-Markdown-Compiler.xlsm
│ │ ├── PTableTemplate.xltx
│ │ └── Todays Market Recap.xlsm
│ ├── VBA-Functions.xlsx
│ └── scripts
│ │ ├── AsynchronousDownloads.vb
│ │ ├── ColumnToTabLoop.vb
│ │ ├── DirectoryList.vb
│ │ ├── Functions.vb
│ │ ├── HideOnClose.vb
│ │ ├── InfoTbl.vb
│ │ ├── JobCleanxls.vb
│ │ ├── JobURLCreator.vb
│ │ ├── LoopThroughFileFolder.vb
│ │ ├── OnTimeRefreshTable.vb
│ │ ├── OpenDownloadsFolder.vb
│ │ ├── PTable.vb
│ │ ├── PrintAdvancedEditor.vb
│ │ ├── QuickFormat.vb
│ │ ├── Shortcuts.vb
│ │ ├── VBA.vb
│ │ ├── VBACode.vb
│ │ ├── WkBkInfoTable.vb
│ │ └── personal.vb
├── csv-datasets
│ ├── BigBangData.csv
│ ├── DirtyData.xlsx
│ ├── GitHubAPI.csv
│ ├── MedExpenseData.csv
│ ├── README.md
│ ├── advertising_data.csv
│ ├── airfares_data.csv
│ ├── auto_data.csv
│ ├── big_bang_data.xlsx
│ ├── boston_data.csv
│ ├── carseats_data.csv
│ ├── challenger_data.csv
│ ├── clean_data.csv
│ ├── credit_card_data.csv
│ ├── djia_sp500_data.csv
│ ├── medexpense_data.csv
│ ├── mini_medexpense_data.csv
│ ├── murder_data.csv
│ ├── occupational_prestige_data.csv
│ ├── phone_service_data.csv
│ ├── sharpe_data.csv
│ ├── toyota_corolla_data.csv
│ └── zip_code_database.csv
├── images
│ ├── CatastrophicFail.jpg
│ ├── ExcelToCode.png
│ └── excel-icon.png
├── index.html
└── misc
│ ├── Lease Dates.xlsx
│ ├── MOTH-FilterUniqueTutorial.xlsx
│ └── Timesheet.xlsx
├── microsoftColors.css
└── renovate.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = crlf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # Gatsby caches
13 | public
14 | .cache
15 |
16 | # User-specific files (MonoDevelop/Xamarin Studio)
17 | *.userprefs
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | bld/
27 | [Bb]in/
28 | [Oo]bj/
29 | [Ll]og/
30 |
31 | # Visual Studio 2015/2017 cache/options directory
32 | .vs/
33 | # Uncomment if you have tasks that create the project's static files in wwwroot
34 | #wwwroot/
35 |
36 | # Visual Studio 2017 auto generated files
37 | Generated\ Files/
38 |
39 | # MSTest test Results
40 | [Tt]est[Rr]esult*/
41 | [Bb]uild[Ll]og.*
42 |
43 | # NUNIT
44 | *.VisualState.xml
45 | TestResult.xml
46 |
47 | # Build Results of an ATL Project
48 | [Dd]ebugPS/
49 | [Rr]eleasePS/
50 | dlldata.c
51 |
52 | # Benchmark Results
53 | BenchmarkDotNet.Artifacts/
54 |
55 | # .NET Core
56 | project.lock.json
57 | project.fragment.lock.json
58 | artifacts/
59 | **/Properties/launchSettings.json
60 |
61 | # StyleCop
62 | StyleCopReport.xml
63 |
64 | # Files built by Visual Studio
65 | *_i.c
66 | *_p.c
67 | *_i.h
68 | *.ilk
69 | *.meta
70 | *.obj
71 | *.iobj
72 | *.pch
73 | *.pdb
74 | *.ipdb
75 | *.pgc
76 | *.pgd
77 | *.rsp
78 | *.sbr
79 | *.tlb
80 | *.tli
81 | *.tlh
82 | *.tmp
83 | *.tmp_proj
84 | *.log
85 | *.vspscc
86 | *.vssscc
87 | .builds
88 | *.pidb
89 | *.svclog
90 | *.scc
91 |
92 | # Chutzpah Test files
93 | _Chutzpah*
94 |
95 | # Visual C++ cache files
96 | ipch/
97 | *.aps
98 | *.ncb
99 | *.opendb
100 | *.opensdf
101 | *.sdf
102 | *.cachefile
103 | *.VC.db
104 | *.VC.VC.opendb
105 |
106 | # Visual Studio profiler
107 | *.psess
108 | *.vsp
109 | *.vspx
110 | *.sap
111 |
112 | # Visual Studio Trace Files
113 | *.e2e
114 |
115 | # TFS 2012 Local Workspace
116 | $tf/
117 |
118 | # Guidance Automation Toolkit
119 | *.gpState
120 |
121 | # ReSharper is a .NET coding add-in
122 | _ReSharper*/
123 | *.[Rr]e[Ss]harper
124 | *.DotSettings.user
125 |
126 | # JustCode is a .NET coding add-in
127 | .JustCode
128 |
129 | # TeamCity is a build add-in
130 | _TeamCity*
131 |
132 | # DotCover is a Code Coverage Tool
133 | *.dotCover
134 |
135 | # AxoCover is a Code Coverage Tool
136 | .axoCover/*
137 | !.axoCover/settings.json
138 |
139 | # Visual Studio code coverage results
140 | *.coverage
141 | *.coveragexml
142 |
143 | # NCrunch
144 | _NCrunch_*
145 | .*crunch*.local.xml
146 | nCrunchTemp_*
147 |
148 | # MightyMoose
149 | *.mm.*
150 | AutoTest.Net/
151 |
152 | # Web workbench (sass)
153 | .sass-cache/
154 |
155 | # Installshield output folder
156 | [Ee]xpress/
157 |
158 | # DocProject is a documentation generator add-in
159 | DocProject/buildhelp/
160 | DocProject/Help/*.HxT
161 | DocProject/Help/*.HxC
162 | DocProject/Help/*.hhc
163 | DocProject/Help/*.hhk
164 | DocProject/Help/*.hhp
165 | DocProject/Help/Html2
166 | DocProject/Help/html
167 |
168 | # Click-Once directory
169 | publish/
170 |
171 | # Publish Web Output
172 | *.[Pp]ublish.xml
173 | *.azurePubxml
174 | # Note: Comment the next line if you want to checkin your web deploy settings,
175 | # but database connection strings (with potential passwords) will be unencrypted
176 | *.pubxml
177 | *.publishproj
178 |
179 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
180 | # checkin your Azure Web App publish settings, but sensitive information contained
181 | # in these scripts will be unencrypted
182 | PublishScripts/
183 |
184 | # NuGet Packages
185 | *.nupkg
186 | # The packages folder can be ignored because of Package Restore
187 | **/[Pp]ackages/*
188 | # except build/, which is used as an MSBuild target.
189 | !**/[Pp]ackages/build/
190 | # Uncomment if necessary however generally it will be regenerated when needed
191 | #!**/[Pp]ackages/repositories.config
192 | # NuGet v3's project.json files produces more ignorable files
193 | *.nuget.props
194 | *.nuget.targets
195 |
196 | # Microsoft Azure Build Output
197 | csx/
198 | *.build.csdef
199 |
200 | # Microsoft Azure Emulator
201 | ecf/
202 | rcf/
203 |
204 | # Windows Store app package directories and files
205 | AppPackages/
206 | BundleArtifacts/
207 | Package.StoreAssociation.xml
208 | _pkginfo.txt
209 | *.appx
210 |
211 | # Visual Studio cache files
212 | # files ending in .cache can be ignored
213 | *.[Cc]ache
214 | # but keep track of directories ending in .cache
215 | !*.[Cc]ache/
216 |
217 | # Others
218 | ClientBin/
219 | ~$*
220 | *~
221 | *.dbmdl
222 | *.dbproj.schemaview
223 | *.jfm
224 | *.pfx
225 | *.publishsettings
226 | orleans.codegen.cs
227 |
228 | # Including strong name files can present a security risk
229 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
230 | #*.snk
231 |
232 | # Since there are multiple workflows, uncomment next line to ignore bower_components
233 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
234 | #bower_components/
235 |
236 | # RIA/Silverlight projects
237 | Generated_Code/
238 |
239 | # Backup & report files from converting an old project file
240 | # to a newer Visual Studio version. Backup files are not needed,
241 | # because we have git ;-)
242 | _UpgradeReport_Files/
243 | Backup*/
244 | UpgradeLog*.XML
245 | UpgradeLog*.htm
246 | ServiceFabricBackup/
247 | *.rptproj.bak
248 |
249 | # SQL Server files
250 | *.mdf
251 | *.ldf
252 | *.ndf
253 |
254 | # Business Intelligence projects
255 | *.rdl.data
256 | *.bim.layout
257 | *.bim_*.settings
258 | *.rptproj.rsuser
259 |
260 | # Microsoft Fakes
261 | FakesAssemblies/
262 |
263 | # GhostDoc plugin setting file
264 | *.GhostDoc.xml
265 |
266 | # Node.js Tools for Visual Studio
267 | .ntvs_analysis.dat
268 | node_modules/
269 |
270 | # Visual Studio 6 build log
271 | *.plg
272 |
273 | # Visual Studio 6 workspace options file
274 | *.opt
275 |
276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
277 | *.vbw
278 |
279 | # Visual Studio LightSwitch build output
280 | **/*.HTMLClient/GeneratedArtifacts
281 | **/*.DesktopClient/GeneratedArtifacts
282 | **/*.DesktopClient/ModelManifest.xml
283 | **/*.Server/GeneratedArtifacts
284 | **/*.Server/ModelManifest.xml
285 | _Pvt_Extensions
286 |
287 | # Paket dependency manager
288 | .paket/paket.exe
289 | paket-files/
290 |
291 | # FAKE - F# Make
292 | .fake/
293 |
294 | # JetBrains Rider
295 | .idea/
296 | *.sln.iml
297 |
298 | # CodeRush
299 | .cr/
300 |
301 | # Python Tools for Visual Studio (PTVS)
302 | __pycache__/
303 | *.pyc
304 |
305 | # Cake - Uncomment if you are using it
306 | # tools/**
307 | # !tools/packages.config
308 |
309 | # Tabs Studio
310 | *.tss
311 |
312 | # Telerik's JustMock configuration file
313 | *.jmconfig
314 |
315 | # BizTalk build output
316 | *.btp.cs
317 | *.btm.cs
318 | *.odx.cs
319 | *.xsd.cs
320 |
321 | # OpenCover UI analysis results
322 | OpenCover/
323 |
324 | # Azure Stream Analytics local run output
325 | ASALocalRun/
326 |
327 | # MSBuild Binary and Structured Log
328 | *.binlog
329 |
330 | # NVidia Nsight GPU debugger configuration file
331 | *.nvuser
332 |
333 | # MFractors (Xamarin productivity tool) working folder
334 | .mfractor/
335 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Patrick Powell
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [GitHub Pages](https://prp1277.github.io/Excel)
2 |
3 | The resources in this repository have been collected over my years of working in Microsoft Excel.
4 |
5 | ## Table of Contents
6 |
7 | ### csv-datasets
8 | Datasets curated from my Business Intelligence classes at Rockhurst University.
9 |
10 | ### Excel-JS
11 | Sample scripts to run using the Script-Labs Excel Add-In.
12 |
13 | ### img
14 | Images to add to posts etc.
15 |
16 | ### PDF-Guides
17 | Guides from blogs, books and other sources that I have used or referenced.
18 |
19 | ### PowerQuery
20 |
21 | - Queries - #M code used behind the scenes
22 | - QueryWorkbooks - The workbook containing the #M
23 |
24 | ### Shortcuts&Formulas
25 | Excel shortcuts to help you stop using your mouse.
26 |
27 | ### Templates
28 | My Personal Macro Workbook and UI Add-In
29 |
30 | ### VBA
31 |
32 | - MacroWorkbooks - Workbooks containing the macros
33 | - Scripts - The VBA in the actual workbooks
34 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/docs/PDF-Guides/EssentialVBATerms.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/EssentialVBATerms.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/ExternalLinkErrors.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/ExternalLinkErrors.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/M#ReferenceGuide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/M#ReferenceGuide.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter1-MergeTables/MergeTables-Finished.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter1-MergeTables/MergeTables-Finished.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter1-MergeTables/MergeTables-Start.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter1-MergeTables/MergeTables-Start.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter2-Grouping/Grouping-Finished.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter2-Grouping/Grouping-Finished.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter2-Grouping/Grouping-Start.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter2-Grouping/Grouping-Start.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/Chapter3-CombiningFilesfromFolder.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/Chapter3-CombiningFilesfromFolder.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/FilesFromFolder.pbix:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/FilesFromFolder.pbix
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/01-January-Copy.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/01-January-Copy.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/01-January.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/01-January.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/02-February.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/02-February.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/03-March.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/03-March.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/04-April.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/04-April.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/05-May.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/05-May.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/06-June.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter3-CombiningFilesfromFolder/SalesReports/06-June.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter4-DynamicCalendarTable/DynamicCalendarTable-Finished.pbix:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter4-DynamicCalendarTable/DynamicCalendarTable-Finished.pbix
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter4-DynamicCalendarTable/DynamicCalendarTable-Finished.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter4-DynamicCalendarTable/DynamicCalendarTable-Finished.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter5-TimeIntelligence/TimeIntelligence-Finished.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter5-TimeIntelligence/TimeIntelligence-Finished.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter5-TimeIntelligence/TimeIntelligence-Start.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter5-TimeIntelligence/TimeIntelligence-Start.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter6-WorkingwithSegments/CreatingSegments-Finished.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter6-WorkingwithSegments/CreatingSegments-Finished.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter6-WorkingwithSegments/CreatingSegments-Start.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Chapter6-WorkingwithSegments/CreatingSegments-Start.xlsx
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Magic-Tricks-for-Data-Wizards.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Magic-Tricks-for-Data-Wizards.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/MagicTricksForDataWizards-V2/Magic-Tricks-for-Data-Wizardsv201802.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/MagicTricksForDataWizards-V2/Magic-Tricks-for-Data-Wizardsv201802.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/Pasting-Data-Types.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/Pasting-Data-Types.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/PowerBICheatSheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/PowerBICheatSheet.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-21Questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-21Questions.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Cells&Ranges.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Cells&Ranges.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-CheatSheet.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-CheatSheet.docx
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-CompleteGuide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-CompleteGuide.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-ErrorHandling.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-ErrorHandling.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Intro.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Intro.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-ObjectModel.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-ObjectModel.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-PivotTableGuide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-PivotTableGuide.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-PivotTables.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-PivotTables.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Pivots.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Pivots.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-R1C1Notation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-R1C1Notation.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Tutorial1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Tutorial1.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Variables.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Variables.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Workbook.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Workbook.pdf
--------------------------------------------------------------------------------
/docs/PDF-Guides/VBA-Worksheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PDF-Guides/VBA-Worksheet.pdf
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/CareerOneStop.pq:
--------------------------------------------------------------------------------
1 | /*
2 | * Parameters
3 | */
4 |
5 | /* baseURL */
6 | "https://api.careeronestop.org/v1/jobsearch/ijJDYCadAcEJZ5e/" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]
7 |
8 | /* JobTitle */
9 | "Business%20Intelligence" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
10 |
11 | /* QS */
12 | "/68144/10/company/ASC/1/200/30?source=NLx&showFilters=true" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]
13 |
14 | /* forEach */
15 | let
16 | Source = (query as text) =>
17 | let
18 | Source = Json.Document(Web.Contents(baseURL & query & QS, [Headers=[Authorization="Bearer //Your Auth"]])),
19 | #"Converted to Table" = Record.ToTable(Source)
20 | in
21 | #"Converted to Table"
22 | in
23 | Source
24 |
25 | /* financialAnalyst */
26 | let
27 | Source = forEach("financial%20analyst"),
28 | #"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "Jobs")),
29 | #"Expanded Value" = Table.ExpandListColumn(#"Filtered Rows", "Value"),
30 | #"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"JvId", "JobTitle", "Company", "AccquisitionDate", "URL", "Location", "Fc"}, {"JvId", "JobTitle", "Company", "AccquisitionDate", "URL", "Location", "Fc"}),
31 | #"Changed Type" = Table.TransformColumnTypes(#"Expanded Value1",{{"JvId", type text}, {"JobTitle", type text}, {"Company", type text}, {"AccquisitionDate", type datetimezone}, {"URL", type text}, {"Location", type text}, {"Fc", type logical}}),
32 | #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Name", "JvId", "Location", "Fc"}),
33 | #"Reordered Columns" = Table.ReorderColumns(#"Removed Columns",{"AccquisitionDate", "Company", "JobTitle", "URL"}),
34 | #"Added Prefix" = Table.TransformColumns(#"Reordered Columns", {{"URL", each "=HYPERLINK("" & _, type text}}),
35 | #"Added Suffix" = Table.TransformColumns(#"Added Prefix", {{"URL", each _ & "", "Apply Now")", type text}})
36 | in
37 | #"Added Suffix"
38 |
39 | /* businessAnalyst */
40 | let
41 | Source = forEach("business%20analyst"),
42 | #"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "Jobs")),
43 | #"Expanded Value" = Table.ExpandListColumn(#"Filtered Rows", "Value"),
44 | #"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"JvId", "JobTitle", "Company", "AccquisitionDate", "URL", "Location", "Fc"}, {"JvId", "JobTitle", "Company", "AccquisitionDate", "URL", "Location", "Fc"}),
45 | #"Changed Type" = Table.TransformColumnTypes(#"Expanded Value1",{{"JvId", type text}, {"JobTitle", type text}, {"Company", type text}, {"AccquisitionDate", type datetimezone}, {"URL", type text}, {"Location", type text}, {"Fc", type logical}}),
46 | #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Name", "JvId"}),
47 | #"Duplicated Column" = Table.DuplicateColumn(#"Removed Columns", "URL", "URL - Copy"),
48 | #"Added Prefix" = Table.TransformColumns(#"Duplicated Column", {{"URL - Copy", each "=HYPERLINK("" & _, type text}}),
49 | #"Added Suffix" = Table.TransformColumns(#"Added Prefix", {{"URL - Copy", each _ & "", "Apply Now")", type text}}),
50 | #"Renamed Columns" = Table.RenameColumns(#"Added Suffix",{{"URL - Copy", "Apply Now"}}),
51 | #"Removed Columns1" = Table.RemoveColumns(#"Renamed Columns",{"URL", "Location", "Fc"}),
52 | #"Reordered Columns" = Table.ReorderColumns(#"Removed Columns1",{"AccquisitionDate", "Company", "JobTitle", "Apply Now"})
53 | in
54 | #"Reordered Columns"
55 |
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/DynamicDateTable.pq:
--------------------------------------------------------------------------------
1 | let
2 | Source = #date(2019,1,1),
3 | Custom1 = List.Dates(Source, Number.From(DateTime.LocalNow())- Number.From(Source) ,#duration(1,0,0,0)),
4 | #"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
5 | #"Duplicated Column" = Table.DuplicateColumn(#"Converted to Table", "Column1", "Column1 - Copy"),
6 | #"Duplicated Column1" = Table.DuplicateColumn(#"Duplicated Column", "Column1", "Column1 - Copy.1"),
7 | #"Duplicated Column2" = Table.DuplicateColumn(#"Duplicated Column1", "Column1", "Column1 - Copy.2"),
8 | #"Duplicated Column3" = Table.DuplicateColumn(#"Duplicated Column2", "Column1", "Column1 - Copy.3"),
9 | #"Duplicated Column4" = Table.DuplicateColumn(#"Duplicated Column3", "Column1", "Column1 - Copy.4"),
10 | #"Duplicated Column5" = Table.DuplicateColumn(#"Duplicated Column4", "Column1", "Column1 - Copy.5"),
11 | #"Extracted Year" = Table.TransformColumns(#"Duplicated Column5",{{"Column1 - Copy", Date.Year, Int64.Type}}),
12 | #"Extracted Month" = Table.TransformColumns(#"Extracted Year",{{"Column1 - Copy.1", Date.Month, Int64.Type}}),
13 | #"Calculated Quarter" = Table.TransformColumns(#"Extracted Month",{{"Column1 - Copy.2", Date.QuarterOfYear, Int64.Type}}),
14 | #"Calculated Week of Year" = Table.TransformColumns(#"Calculated Quarter",{{"Column1 - Copy.3", Date.WeekOfYear, Int64.Type}}),
15 | #"Extracted Day" = Table.TransformColumns(#"Calculated Week of Year",{{"Column1 - Copy.4", Date.Day, Int64.Type}}),
16 | #"Extracted Day Name" = Table.TransformColumns(#"Extracted Day", {{"Column1 - Copy.5", each Date.DayOfWeekName(_), type text}}),
17 | #"Renamed Columns" = Table.RenameColumns(#"Extracted Day Name",{{"Column1 - Copy", "Year"}, {"Column1 - Copy.1", "Month"}, {"Column1 - Copy.2", "Quarter"}, {"Column1 - Copy.3", "Week"}, {"Column1 - Copy.4", "Day"}, {"Column1", "Date"}, {"Column1 - Copy.5", "Name of Day"}}),
18 | #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}})
19 | in
20 | #"Changed Type"
21 |
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/EpochDateTable.pq:
--------------------------------------------------------------------------------
1 | let
2 | Source = {DateTime.LocalNow() - #datetime(1970,01,01,0,0,0)},
3 | #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
4 | #"Duplicated Column" = Table.DuplicateColumn(#"Converted to Table", "Column1", "Column1 - Copy"),
5 | #"Renamed Columns" = Table.RenameColumns(#"Duplicated Column",{{"Column1", "Unix Time"}, {"Column1 - Copy", "Duration"}}),
6 | #"Calculated Total Seconds" = Table.TransformColumns(#"Renamed Columns",{{"Unix Time", Duration.TotalSeconds, type text}}),
7 | #"Changed Type" = Table.TransformColumnTypes(#"Calculated Total Seconds",{{"Duration", type duration}, {"Unix Time", type number}}),
8 | #"Added Custom" = Table.AddColumn(#"Changed Type", "Now", each DateTime.LocalNow()),
9 | #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Now", type datetimezone}})
10 | in
11 | #"Changed Type1"
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/ImportPDF.pq:
--------------------------------------------------------------------------------
1 | Pdf.Tables(
2 | File.Contents(
3 | "C:\Users\prp12.000\GitHub-Repos\resources\Excel\Notes\M#ReferenceGuide.pdf"
4 | ),
5 | [StartPage=1, EndPage=10]
6 | )
7 |
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/Index.pq:
--------------------------------------------------------------------------------
1 | let
2 | Source = Excel.CurrentWorkbook(){[Name="config"]}[Content],
3 | #"Changed Type" = Table.TransformColumnTypes(Source,{{"parameter", type text}, {"value", type text}})
4 | in
5 | #"Changed Type"
6 |
7 | let
8 | Source = Folder.Files("C:\Users\prp12.000\GitHub-Repos\Excel"),
9 | #"Removed Columns" = Table.RemoveColumns(Source,{"Content"}),
10 | #"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([Extension] <> "" and [Extension] <> ".idx" and [Extension] <> ".pack" and [Extension] <> ".sample")),
11 | #"Replaced Value" = Table.ReplaceValue(#"Filtered Rows","C:\Users\prp12.000\GitHub-Repos\Excel","https://github.com/prp1277/Excel/tree/master",Replacer.ReplaceText,{"Folder Path"}),
12 | #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","\","/",Replacer.ReplaceText,{"Folder Path"}),
13 | #"Merged Columns" = Table.CombineColumns(#"Replaced Value1",{"Folder Path", "Name"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Index"),
14 | #"Removed Other Columns" = Table.SelectColumns(#"Merged Columns",{"Index"})
15 | in
16 | #"Removed Other Columns"
17 |
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/IndexCreator.pq:
--------------------------------------------------------------------------------
1 | /** Source = Folder */
2 | let
3 | Source = Folder.Files("C:\Users\prp12.000\prp1277-Github\prp1277.github.io\src\pages\docs\excel")
4 | in
5 | Source
6 |
7 | /** Transformation */
8 | let
9 | Source = Folder.Files("C:\Users\prp12.000\prp1277-Github\prp1277.github.io\src\pages\docs\excel"),
10 | #"C:\Users\prp12 000\prp1277-Github\prp1277 github io\src\pages\docs\excel\_gh-flavored-markdown md" = Source{[#"Folder Path"="C:\Users\prp12.000\prp1277-Github\prp1277.github.io\src\pages\docs\excel\",Name="gh-flavored-markdown.md"]}[Content],
11 | #"Imported CSV" = Csv.Document(#"C:\Users\prp12 000\prp1277-Github\prp1277 github io\src\pages\docs\excel\_gh-flavored-markdown md",[Delimiter="#(tab)", Encoding=1252, QuoteStyle=QuoteStyle.Csv]),
12 | #"Kept Range of Rows" = Table.Range(#"Imported CSV",1,3),
13 | #"Split Column by Delimiter" = Table.SplitColumn(#"Kept Range of Rows", "Column1", Splitter.SplitTextByDelimiter(":", QuoteStyle.None), {"Column1.1", "Column1.2"}),
14 | #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Column1.1", type text}, {"Column1.2", type text}}),
15 | #"Replaced Value" = Table.ReplaceValue(#"Changed Type","[","",Replacer.ReplaceText,{"Column1.2"}),
16 | #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","]","",Replacer.ReplaceText,{"Column1.2"}),
17 | #"Transposed Table" = Table.Transpose(#"Replaced Value1"),
18 | #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
19 | #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"title", type text}, {"date", type text}, {"tags", type text}}),
20 | #"Split Column by Delimiter1" = Table.SplitColumn(#"Changed Type1", "tags", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"tags.1", "tags.2", "tags.3"}),
21 | #"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"tags.1", type text}, {"tags.2", type text}, {"tags.3", type text}}),
22 | #"Trimmed Text" = Table.TransformColumns(#"Changed Type2",{{"title", Text.Trim, type text}, {"tags.3", Text.Trim, type text}, {"tags.2", Text.Trim, type text}, {"tags.1", Text.Trim, type text}, {"date", Text.Trim, type text}})
23 | in
24 | #"Trimmed Text"
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/ParamTables.pq:
--------------------------------------------------------------------------------
1 | let
2 | Source = Excel.CurrentWorkbook(){[Name="MyTable"]}[Content],
3 | #"Added Custom" = Table.AddColumn(Source, "File Path", each fnGetParameter("File Path")),
4 | #"Added Custom1" = Table.AddColumn(#"Added Custom", "First Date", each fnGetParameter("Start Date")),
5 | #"Changed Type" = Table.TransformColumnTypes(#"Added Custom1",{{"File Path", type text}, {"First Date", type date}, {"MyTable", type text}})
6 | in
7 | #"Changed Type"
8 | /** fnGetParameter */
9 | (ParameterName as text) =>
10 | let
11 | ParamSource = Excel.CurrentWorkbook(){[Name="Parameters"]}[Content],
12 | ParamRow = Table.SelectRows(ParamSource, each([Parameter] = ParameterName)),
13 | Value = if Table.IsEmpty(ParamRow)=true
14 | then null
15 | else Record.Field(ParamRow{0}, "Value")
16 | in
17 | Value
--------------------------------------------------------------------------------
/docs/PowerQuery/Queries/Swapi.pq:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // ParamStrings
3 | //-----------------------------------------------------------------------------
4 | // baseURL
5 | "https://swapi.co/api/" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
6 |
7 | // query
8 | "planets" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
9 |
10 | // page - Adds Pagination
11 | "/6" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true]
12 |
13 | //-----------------------------------------------------------------------------
14 | // Validation
15 | //-----------------------------------------------------------------------------
16 | // results as a string
17 | let
18 | Source = baseURL & query & page
19 | in
20 | Source
21 |
22 | //-----------------------------------------------------------------------------
23 | // Results
24 | //-----------------------------------------------------------------------------
25 | // Results as list
26 | let
27 | Source = Json.Document(Web.Contents(baseURL & query)),
28 | results = Source[results]
29 | in
30 | results
31 |
32 | //-----------------------------------------------------------------------------
33 | // Functions
34 | //-----------------------------------------------------------------------------
35 | // forEach(`${query}`)
36 | let
37 | Source = (query as text) => let
38 | Source = Json.Document(Web.Contents(baseURL & query)),
39 | results = Source[results]
40 | in
41 | results
42 | in
43 | Source
44 |
45 | //-----------------------------------------------------------------------------
46 | // Functions
47 | //-----------------------------------------------------------------------------
48 | // Paginate
49 | let
50 | Source = Json.Document(Web.Contents(baseURL & query & page))
51 | in
52 | Source
53 |
54 | //-----------------------------------------------------------------------------
55 | // Invoked Functions
56 | //-----------------------------------------------------------------------------
57 | // "planets"
58 | let
59 | Source = forEach("planets")
60 | in
61 | Source
62 |
63 | //-----------------------------------------------------------------------------
64 | // Invoked Functions
65 | //-----------------------------------------------------------------------------
66 | // "people"
67 | let
68 | Source = forEach("people")
69 | in
70 | Source
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/GithubEventsQuery.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/GithubEventsQuery.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/ParameterTables.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/ParameterTables.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/SAC-1.0.0.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/SAC-1.0.0.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/SportsRadar.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/SportsRadar.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/SwapiAPI.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/SwapiAPI.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/QueryWorkbooks/index.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/PowerQuery/QueryWorkbooks/index.xlsx
--------------------------------------------------------------------------------
/docs/PowerQuery/README.md:
--------------------------------------------------------------------------------
1 | ## Favor JavaScript formatting Over SQL
2 |
3 | `let ({query} as {type}) => (`${query}`)`
4 |
5 | is essentially the same thing as an ES6 Template String
6 |
--------------------------------------------------------------------------------
/docs/ScriptLab/BasicApiCall.js:
--------------------------------------------------------------------------------
1 | $("#run").click(() => tryCatch(run));
2 |
3 | function run() {
4 | return Excel.run(function(context) {
5 | var range = context.workbook.getSelectedRange();
6 | range.format.fill.color = "yellow";
7 | range.load("address");
8 | return context.sync().then(function() {
9 | console.log('The range address was "' + range.address + '".');
10 | });
11 | });
12 | }
13 |
14 | /** Default helper for invoking an action and handling errors. */
15 | function tryCatch(callback) {
16 | Promise.resolve()
17 | .then(callback)
18 | .catch(function(error) {
19 | // Note: In a production add-in, you'd want to notify the user through your add-in's UI.
20 | console.error(error);
21 | });
22 | }
23 |
--------------------------------------------------------------------------------
/docs/ScriptLab/GitHubStars.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Gets the star count for a given org/user and repo. Try =GETSTARCOUNT("officedev","office-js")
3 | * @customfunction
4 | * @param userName Name of org or user.
5 | * @param repoName Name of the repo.
6 | * @return Number of stars.
7 | */
8 | async function getStarCount(userName = "prp1277", repoName = "Excel") {
9 | //You can change this URL to any web request you want to work with.
10 | const url = `https://api.github.com/repos/${userName}/${repoName}`;
11 | const response = await fetch(url);
12 |
13 | //Expect that status code is in 200-299 range
14 | if (!response.ok) {
15 | throw new Error(response.statusText);
16 | }
17 | const jsonResponse = await response.json();
18 | return jsonResponse.watchers_count;
19 | }
20 |
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/Buyer-Shortcuts.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/Buyer-Shortcuts.pdf
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/Excel-Formulas.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/Excel-Formulas.pdf
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/Excel-Functions.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/Excel-Functions.xlsx
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/Excel-Shortcuts.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/Excel-Shortcuts.xlsx
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/OneNote-Shortcuts.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/OneNote-Shortcuts.pdf
--------------------------------------------------------------------------------
/docs/Shortcuts&Formulas/Windows-7-Keyboard-Shortcuts.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Shortcuts&Formulas/Windows-7-Keyboard-Shortcuts.pdf
--------------------------------------------------------------------------------
/docs/SuperchargeExcel/SuperchargeBI.dax:
--------------------------------------------------------------------------------
1 |
2 | Total Customers
3 | =COUNT(Customers[CustomerKey])
4 |
5 | Distinct Customers
6 | =DISTINCTCOUNT(Customers[CustomerKey])
7 |
8 | Count of Occupations
9 | =DISTINCTCOUNT(Customers[Occupation])
10 |
11 | New Customers Fixed Period
12 | =VAR _currentDate =
13 | MAX ( 'Calendar'[Date] )
14 | VAR _salesThisPeriod = [Total Sales]
15 | VAR _customers =
16 | ADDCOLUMNS (
17 | Customers,
18 | "Sales Until Now", CALCULATE (
19 | [Total Sales],
20 | DATESINPERIOD ( 'Calendar'[Date], _currentDate, -1, YEAR )
21 | ),
22 | "Running Total Sales", [Running Total Sales]
23 | )
24 | VAR _newCustomers =
25 | FILTER (
26 | _customers,
27 | [Running Total Sales] = [Sales Until Now]
28 | && [Sales Until Now] > 0
29 | )
30 | RETURN
31 | ( IF ( _salesThisPeriod > 0, COUNTROWS ( _newCustomers ) ) )
32 |
33 | Total Products
34 | =COUNT(Products[ProductKey])
35 |
36 | Total Sales and Tax SUMX
37 | =SUMX(Sales, Sales[ExtendedAmount] + Sales[TaxAmt])
38 |
39 | Dealer Margin
40 | =SUMX(Products, Products[ListPrice] - Products[DealerPrice])
41 |
42 | Average Safety Stock
43 | =AVERAGEX(Products, Products[SafetyStockLevel])
44 |
45 | Total Sales
46 | =SUM(Sales[ExtendedAmount])
47 |
48 | Qty Sold
49 | =SUM(Sales[OrderQuantity])
50 |
51 | Count of Occupation
52 | =COUNT(Customers[Occupation])
53 |
54 | Customers with Purchases
55 | =DISTINCTCOUNT(Sales[CustomerKey])
56 |
57 | Total Sales SUMX
58 | =SUMX(Sales, Sales[ExtendedAmount] * Sales[OrderQuantity])
59 |
60 | Total Sales with Tax SUMX
61 | =SUMX(Sales, Sales[ExtendedAmount] + Sales[TaxAmt])
62 |
63 | Total Sales including Freight
64 | =SUMX(Sales, Sales[ExtendedAmount] + Sales[Freight])
65 |
66 | Average Sell Price per Item
67 | =AVERAGEX(Sales, Sales[ExtendedAmount])
68 |
69 | Average Tax Paid
70 | =AVERAGEX(Sales,Sales[TaxAmt])
71 |
72 | Total Sales of Blue Products
73 | =CALCULATE([Total Sales], Products[Color]="Blue")
74 |
75 | This Period Customers
76 | =DISTINCTCOUNT(Sales[CustomerKey])
77 |
78 | Running Total Customers
79 | =VAR _currentDate =
80 | MAX ( 'Calendar'[Date] )
81 | VAR _salesThisPeriod = [Total Sales]
82 | RETURN
83 | IF (
84 | _salesThisPeriod > 0,
85 | CALCULATE (
86 | [This Period Customers],
87 | FILTER (
88 | ALLSELECTED ( 'Calendar'[Date] ),
89 | ISONORAFTER ( 'Calendar'[Date], _currentDate, DESC )
90 | )
91 | )
92 | )
93 |
94 | Running Total Sales
95 | =VAR _currentDate =
96 | MAX ( 'Calendar'[Date] )
97 | RETURN
98 | CALCULATE (
99 | [Total Sales],
100 | FILTER (
101 | ALLSELECTED ( 'Calendar'[Date] ),
102 | ISONORAFTER ( 'Calendar'[Date], _currentDate, DESC )
103 | )
104 | )
105 |
106 | Count of Country
107 | =DISTINCTCOUNT(Territory[Country])
108 |
109 | Returning Customers Fixed Period
110 | =
111 | VAR _currentDate = MAX('Calendar'[Date])
112 | VAR _salesThisPeriod = [Total Sales]
113 | VAR _customers = ADDCOLUMNS(
114 | Customers,
115 | "Sales Until Now",
116 | CALCULATE(
117 | [Total Sales],
118 | DATESINPERIOD(
119 | 'Calendar'[Date],
120 | _currentDate,
121 | -1,
122 | YEAR
123 | )
124 | ),
125 | "Running Total Sales",
126 | [Running Total Sales])
127 | VAR _returningCustomers =
128 | FILTER(_customers,
129 | [Sales Until Now]>0 && [Sales Until Now]<[Running Total Sales])
130 | return
131 | IF(_salesThisPeriod>0, COUNTROWS(_returningCustomers))
132 |
--------------------------------------------------------------------------------
/docs/SuperchargeExcel/SuperchargeExcel.md:
--------------------------------------------------------------------------------
1 | # 2: Concept: Loading Data
2 |
3 | > Highlight (yellow) - Location 493
4 |
5 | Business users can think of a dimension table as a lookup table and a fact table as a data (or transactions) table.
6 |
7 | > Highlight (yellow) - Location 546
8 |
9 | A data table contains transactional information — in this case sales transactions. Lookup tables contain information about logical groups of objects, such as customers, products, time (calendar), etc.
10 |
11 | > Highlight (yellow) - Location 550
12 |
13 | Each of these tables must have a unique ID column, such as ProductNumber, CustomerNumber, etc. These unique columns are sometimes called keys.
14 |
15 | > Highlight (yellow) - Location 557
16 |
17 | Unlike in other database programs (Power Pivot is actually a database), there is no other type of table join available in Power Pivot
18 |
19 | > Highlight (yellow) - Location 558
20 |
21 | The data table may contain none, one, or many rows of data for each row in the lookup table. The following “Here’s How” shows how to join tables.
22 |
23 | > Highlight (yellow) - Location 584
24 |
25 | Because the relationships are always one-to-many, the joins are specifically single-directional. Always drag from the data table up to the lookup table, not the other way around
26 |
27 | > Highlight (yellow) - Location 635
28 |
29 | The Collie layout methodology involves placing the lookup tables at the top of the window and the data tables at the bottom.
30 |
31 | > Highlight (yellow) - Location 640
32 |
33 | In the IT world, lookup tables are referred to as dimension tables, and data tables are called fact tables.
34 |
35 | > Highlight (yellow) - Location 648
36 |
37 | It is no longer necessary to bring data from the lookup tables into the data tables by using VLOOKUP(). Instead, you can simply load the lookup tables and join them with a relationship.
38 |
39 | > Highlight (yellow) - Location 654
40 |
41 | A key feature of a lookup table is that it contains one and only one row for each individual item in the table, and it has as many columns as needed to describe the object.
42 |
43 | > Highlight (yellow) - Location 664
44 |
45 | In this case, the Sales table contains one column (technically called a foreign key) that matches each of the keys in each lookup table (technically called a primary key). Stated differently, the Sales data table has four foreign key columns: a date, a customer number, a product number, and a territory key.
46 |
47 | > Highlight (yellow) - Location 670
48 |
49 | Ideally, data tables should have very few columns but as many rows as needed to bring in all the data records. Data tables normally have lots of rows (sometimes in the tens of millions or even billions).
50 |
51 | > Highlight (yellow) - Location 778
52 |
53 | The data connections you create in Power Query are relative to your computer. When you send a workbook and data source to another user, that person will have to edit the data connection so that it will work on his or her own PC.
54 |
55 | # 3. Concept: Measures
56 |
57 | > Highlight (yellow) - Location 826
58 |
59 | A measure is simply a DAX formula that instructs Power Pivot to do a calculation on data. In a sense, a measure is a lot like a formula in a cell in Excel. The main difference, however, between a formula in a cell in Excel and a measure is that a measure always operates over the entire data model, not over just a few cells in a spreadsheet.
60 |
61 | ## Techniques for Writing DAX Measures
62 |
63 | > Highlight (yellow) - Location 839-840
64 |
65 | You can write a measure in the formula bar in the Power Pivot window, as shown below. If you use this method, you must specify the measure name followed by a colon and then the formula. Note that there can be no spaces between the measure name, the colon, and the equals sign.
66 |
67 | > Matt Allington. Supercharge Excel (Kindle Locations 843-844).
68 |
69 | You can write and edit measures in any empty cell in the calculation area at the bottom of the Power Pivot window, as shown below. Note that you need to use a colon here, too.
70 |
71 | > Matt Allington. Supercharge Excel (Kindle Locations 846-847).
72 |
73 | You can write measures in the Measure dialog in Excel, as shown below. You can open this dialog from within Excel by navigating to the Power Pivot tab (see #1 below) and clicking on the Measures button (# 2) and then New Measure. In general, Excel users should write DAX in the Measure dialog box in Excel. And it is normally best to first create a pivot table that provides some context for a measure you are about to write. If you do it this way, you immediately see the measure in a pivot table when you click OK
74 |
75 | ### Writing Measures
76 |
77 | Follow these steps:
78 |
79 | 1. Create a new, blank pivot table connected to the data model.
80 | 2. Add data to the rows.
81 | 3. Click inside the pivot table, go to the Power Pivot tab and select Add Measure.
82 | 4. Make sure to place the measure in the same table that the data comes from.
83 | 5. Use descriptive & unique names
84 | 6. Write the DAX formula & click 'Check Formula' to validate
85 | 7. Select the desired data format & click 'OK'
86 |
87 | #### Avoiding Implicit Measures
88 |
89 | Implicit Measures are what traditional pivot tables used when you used 'Count of x' or 'Sum of y' in the values pane.
90 |
91 | > Matt Allington. Supercharge Excel (Kindle Locations 945-946).
92 |
93 | It is best practice in DAX to always type the table name before every column name inside your formulas
94 |
95 | Use the 'Manage Measures' dialog box to view, edit or delete measures from the workbook. Since the Measure dialog box is modal you can't do anything while it is open. If you are having problems with a DAX formula you can either set the measure `=1` or wrap the formula in double quotes so it doesn't evaluate. If you need to use double quotes in the formula, replace the double quotes in the formula with single quotes then come back to it later.
96 |
97 | # 4. DAX Topic: SUM(), COUNT(), COUNTROWS(), MIN(), MAX(), COUNTBLANK(), DIVIDE()
98 |
99 | ## Aggregate Functions
100 |
101 | These functions take inputs from a column or table and aggregate the contents. You have to tell Power Pivot how to aggregate the data so it returns just a single value to each cell in the pivot table. The iterable nature of applying these aggregations to each cell is what makes power pivot so powerful.
102 |
103 | ### Practice Problem:
104 |
105 | Using the data we imported from Access, create the following measures:
106 |
107 | 1. [Total Sales]
108 | `=SUM ( Sales[ExtendedAmount] )`
109 | 2. [Total Cost]
110 | `=SUM ( Sales[ProductStandardCost] )`
111 | 3. [Total Margin $]
112 | `=[Total Sales] - [Total Cost]`
113 | 4. [Total Margin %]
114 | `=DIVIDE ( [Total Margin], [Total Sales], "" )`
115 | 5. [Total Sales Tax Paid]
116 | `=SUM ( Sales[TaxAmt] )`
117 | 6. [Total Sales Including Tax]
118 | `=[Total Sales] + [Total Sales Tax Paid]`
119 | 7. [Total Order Quantity]
120 | `=SUM ( Sales[OrderQuantity] )`
121 | 8. [Total Number of Products]
122 | `=COUNT ( [ProductKey] )`
123 | 9. [Total Number of Customers]
124 | `=COUNT ( Customers[CustomerKey] )`
125 | 10. [Total Products Using COUNTROWS]
126 | `=COUNTROWS ( Products )`
127 | 11. [Total Customers Using COUNTROWS]
128 | `=COUNTROWS ( Customers )`
129 | 12. [Total Customers using DISTINCTCOUNT]
130 | `=DISTINCTCOUNT ( Customers[CustomerKey] )`
131 | 13. [Count of Occupation]
132 | `=DISTINCTCOUNT ( Customers[Occupation] )`
133 | 14. [Count of Country]
134 | `=DISTINCTCOUNT ( Territory[Country] )`
135 | 15. [Customers that Have Purchased]
136 | `=DISTINCTCOUNT ( Sales[CustomerKey] )`
137 | 16. [Maximum Tax Paid on a Product]
138 | `=MAX ( Sales[TaxAmt] )`
139 | 17. [Minimum Price Paid for a Product]
140 | `=MIN ( Sales[SalesAmount] )`
141 | 18. [Average Price Paid for a Product]
142 | `=AVERAGE ( Sales[SalesAmount] )`
143 | 19. [Customers Without Address Line 2]
144 | `=COUNTBLANK ( [AddressLine2] )`
145 | 20. [Products Without Weight Values]
146 | `=COUNTBLANK ( Products[Weight] )`
147 | 21. [Margin %]
148 | `=DIVIDE ( [Total Margin], [Total Sales] )`
149 | 22. [Markup %]
150 | `=DIVIDE ( [Total Margin], [Total Cost] )`
151 | 23. [Tax %]
152 | `=DIVIDE ( [Total Sales Tax Paid], [Total Sales] )`
153 |
154 | ### Pivot Table Conditional Formatting
155 |
156 | Highlight the cells, click 'Conditional Formatting' and select the visualization. It's easier to select one of the cells, apply the formatting, then use the pop-up box to apply the formatting to the _rows only_, _leaving out the grand total_.
157 |
158 | ### When are Measures Automatically Added?
159 |
160 | The pivot table must be selected before writing the measure AND you have to save the measure without creating an error on save. If the formula isn't checked and creates an error the measure will not be automatically added to the pivot table after the error is fixed.
161 |
162 | ### Filter Context
163 |
164 | > Matt Allington. Supercharge Excel (Kindle Locations 1451-1458).
165 |
166 | Note that the first measure, [Customers Without Address Line 2], is being filtered by the pivot table (i.e., Customers[ Occupation] on Rows), and the values in the pivot table change with each row. But the second measure, [Products Without Weight Values], is not filtered; the values don’t change for each row in the pivot table. The technical term for filtering behavior in Power Pivot is _filter context_.
167 |
168 | > Matt Allington. Supercharge Excel (Kindle Locations 1468-1470).
169 |
170 | If you use DIVIDE() instead of the slash operator (/) for division, DAX returns a blank where you would otherwise get a divide-by-zero error. Given that a pivot table will filter out blank rows by default, a blank row is a much better option than an error.If you don’t specify the alternate result, a blank value is returned when there is a divide-by-zero error.
171 |
172 | ### Initial Filter Context
173 |
174 | It is important that you learn to “read” the initial filter context from your visuals because it will help you understand how each value in a visual is calculated. And it is important to refer to the full table name and column name because that forces you to look, check, and confirm exactly which tables and columns you are using in your visuals.
175 |
176 | The filters automatically flow from the “one” side of the relationship to the “many” side of the relationship, in the direction of the arrow; or you can think of the filters as flowing from the lookup table to the data table. Whatever terms you use, it’s always downhill. The connected table - the Sales table - is then also filtered.
177 |
178 | It's important to remember that all cells are evaluated on their own, without regard for any other cell in the visual, even if the cell is a subtotal or grand total cell.
179 |
180 | # 6. Concept: Lookup Tables & Data Tables
181 |
182 | ## Data Tables
183 |
184 | Data tables are typically the largest tables loaded into Power BI. Examples of data tables are Sales, Budget, Exchange Rates, General Ledgers and stock counts. There is no limitation on how often similar transactions can occur and be stored in a data table.
185 |
186 | ## Lookup Tables
187 |
188 | Lookup tables tend to be smaller and wider than data tables. Some examples include Customers, Products and Calendars. Lookup tables **must** have a uniquely identifying code of some type to uniquely differentiate each row in the table - the primary key.
189 |
190 | ## Denormalising Tables
191 |
192 | In old Excel pivot tables had to be based on one, single, table. You would then write a bunch of lookup functions to bring information from other tables into the source of your pivot table data. The problem with this is the duplication of data - files quickly become bloated and inefficient.
193 |
194 | > The more unique values a column has, the less the data will be compressed by the PBI data model. The number of columns in your data tables is much more important than the number of rows.
195 |
196 | Fewer columns and more rows is better than more columns and fewer rows, especially for large tables.
197 |
198 | ## Joining Tables Using Relationships
199 |
200 | To avoid repetitive data, keep that data in separate subtables. For example, if the sales table contains the unique product key, it can fetch any extra information from the product master table whenever it's needed. Once the relationship is created the tables work together as if they were a single unit without the need to create duplicate data in the Sales table.
201 |
202 | ## Schemas
203 |
204 | ### Star Schemas
205 |
206 | The data table is the center of the star. In our case, this is the Sales table. There are supporting lookup tables that add information using primary & foreign keys. You could use vlookups to fetch the columns from other tables, but that's not necessary with relationships.
207 |
208 | ## General Advice
209 |
210 | 1. Keep data tables long and skinny. Get rid of extra columns by unpivoting tables
211 | 2. Move repeating attribute columns from data tables to lookup tables.
212 | 3. If your lookup tables are joined to other lookup tables, consider flatening them into a single, wider, lookup table.
213 |
214 | # 7. DAX Topic: The Basic Iterators `SUMX()` and `AVERAGEX()`
215 |
216 | Iterative functions have _row context_. This means that the function is "aware" of which row it is referencing at any point in time.
217 |
218 | ## `SUMX(table, expression)`
219 |
220 | SUMX creates a row context in the specified table then iterates through each row, one at a time, evaluating the expression for each row it gets to before it finally adds the interim results for each row. There is no need to wrap the columns in an aggregation function when using X-functions because that's essentially what these function are doing.
221 |
222 | During each step of the iteration process, the column names in the expression are only referring to a single cell - the one at the intersection of the single column and the current row. This works like a running total. One row at a time, the single value in the `Sales[ExtendedAmount]` column is added to the single value of the `Sales[TaxAmt]` column.
223 |
224 | ### When to use X-Functions vs Aggegators
225 |
226 | When data doesn't contain a line total. For example, if your table has a column for quantity and another for price per unit, but doesn't include Total Sales. These are useful functions for when you need to calculate an average or multiply values. The example in the book uses the multiplication of the averages at the grand total level. Think of which level the aggregation needs to apply to. Things can start getting funky if you start doing row-level operations where they should be column-wise / categorical (think: averages).
227 |
228 | # 8. DAX Topic: Calculated Columns
229 |
230 | Generally, favor measures & Power Query over calculated columns. You should, however, use calculated columns if:
231 |
232 | 1. You need to filter / slice a visual based on the results of a column
233 | 2. You can't bring the column of data you need in from your source data or by using Power Query
234 |
235 | Ideally, you want to push the column as far back to the source as possible. If you can add the column in Access or Power Query, do it there instead of a calculated column.
236 |
237 | # 9. DAX Topic: `CALCULATE()`
238 |
239 | `Calculate(expression, filter 1, filter 2, filter n...)`
240 |
241 | The `CALCULATE()` function alters the filter context coming from the visual by applying none, one or more filters **prior** to evaluating the expression. Taking a filter from a lookup table and propagating it to the data table is what the Power Pivot engine in Power BI was built and optimized to do. Just think about the interactions between visuals and how changing the context of one visual affects the rest of the visuals on that page.
242 |
--------------------------------------------------------------------------------
/docs/SuperchargeExcel/readme.md:
--------------------------------------------------------------------------------
1 | Notes taken as I read [Supercharge Excel](https://exceleratorbi.com.au/supercharge-excel/) by [Matt Allington](https://twitter.com/ExceleratorBI).
2 |
3 | ## Table of Contents
4 |
5 | Introduction
6 |
7 | 1. Concept: Introduction to Data Modelling
8 | 2. Concept: Loading Data
9 | 3. Concept: Measures
10 | 4. DAX Topic: SUM(), COUNT(), COUNTROWS(), MIN(), MAX(), COUNTBLANK(), DIVIDE()
11 | 5. Concept: Filter Propagation
12 | 6. Concept: Lookup Tables & Data Tables
13 | 7. DAX Topic: The Basic Iterators SUMX() and AVERAGEX()
14 | 8. DAX Topic: Calculated Columns
15 | 9. DAX Topic: CALCULATE()
16 | 10. Concept: Evaluation Context and Context Transition
17 | 11. DAX Topic: IF(), SWITCH(), and FIND()
18 | 12. DAX Topic: VALUES() and HASONEVALUE()
19 | 13. DAX Topic: ALL(), ALLEXCEPT() and ALLSELECTED()
20 | 14. DAX Topic: FILTER()
21 | 15. DAX Topic: Time Intelligence
22 | 16. DAX Topic: RELATED() and RELATEDTABLE()
23 | 17. Concept: Disconnected Tables
24 | 18. Concept: KPIs
25 | 19. Concept: Multiple Data Tables
26 | 20. Concept: Cube Formulas
27 | 21. Moving From Excel to Power BI
28 | 22. Next Steps on Your DAX Journey
29 | 23. Appendix A: Answers to Practice Exercises
30 | 24. Table of Here's How Sections
31 |
--------------------------------------------------------------------------------
/docs/Templates/Excel Customizations.exportedUI:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/Templates/PERSONAL-2020-07.xlsb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Templates/PERSONAL-2020-07.xlsb
--------------------------------------------------------------------------------
/docs/Templates/PERSONAL.xlsb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/Templates/PERSONAL.xlsb
--------------------------------------------------------------------------------
/docs/Templates/excel_customizations.exportedUI:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/ExcelLocationMacro.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/ExcelLocationMacro.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/GetWbFileInfo.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/GetWbFileInfo.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/HyperlinkFileList.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/HyperlinkFileList.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/JobURLMacro.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/JobURLMacro.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Introduction-after recording.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Introduction-after recording.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Introduction.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Introduction.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Large Macro ExampIe.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Large Macro ExampIe.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Profits.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter01/Profits.xlsx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Phone List.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Phone List.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Playback_Button.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Playback_Button.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Playback_Ribbon.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter02/Playback_Ribbon.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter03/UsefulMacros.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter03/UsefulMacros.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter03/WorkbookWithMacros.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter03/WorkbookWithMacros.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter04/AddCode.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter04/AddCode.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter04/WatchCode.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter04/WatchCode.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/DoLoops.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/DoLoops.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/Interactive.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/Interactive.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/MailingLists-2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/MailingLists-2.xlsx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/MailingLists.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter05/MailingLists.xlsx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Final.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Final.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-2.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-2.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-3.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-3.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-4.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-4.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-5.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-5.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-6.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial-6.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Partial.xlsx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Scoping.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter06/Scoping.xlsx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter07/UsefulMacros.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Lynda-Learning-Excel2016_MacrosInDepth/Chapter07/UsefulMacros.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/MacroWorkbook.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/MacroWorkbook.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/OneNote-Markdown-Compiler.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/OneNote-Markdown-Compiler.xlsm
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/PTableTemplate.xltx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/PTableTemplate.xltx
--------------------------------------------------------------------------------
/docs/VBA/MacroWorkbooks/Todays Market Recap.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/MacroWorkbooks/Todays Market Recap.xlsm
--------------------------------------------------------------------------------
/docs/VBA/VBA-Functions.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/VBA-Functions.xlsx
--------------------------------------------------------------------------------
/docs/VBA/scripts/AsynchronousDownloads.vb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/VBA/scripts/AsynchronousDownloads.vb
--------------------------------------------------------------------------------
/docs/VBA/scripts/ColumnToTabLoop.vb:
--------------------------------------------------------------------------------
1 | Sub WorkGroups()
2 |
3 | 'Instantiate variables
4 | Dim maxGroup As Integer
5 | Dim dropSheets As Integer
6 | Dim ws As Worksheet
7 | Dim i As Integer
8 | Dim targetGroup As Integer
9 | Dim targetRow As Integer
10 | Dim name As String
11 |
12 | 'Determine the number of groups
13 | maxGroup = WorksheetFunction.Max(Columns(2))
14 |
15 | 'Drop group worksheets
16 | dropSheets = MsgBox("Do you want to delete the current Group Worksheets? ", vbYesNo, "Delete Worksheets")
17 | If dropSheets = vbYes Then
18 | Application.DisplayAlerts = False
19 | For Each ws In ActiveWorkbook.Worksheets
20 | If ws.name <> "Master" Then
21 | ws.Delete
22 | End If
23 | Next
24 | Application.DisplayAlerts = True
25 |
26 | 'Create new group worksheets
27 | For i = maxGroup To 1 Step -1
28 | Set ws = Worksheets.Add(After:=Worksheets("Master"))
29 | ws.name = "Group " & i
30 | ws.Cells(1, 1).Value = "Name"
31 | ws.Cells(1, 1).Font.Bold = True
32 | Next i
33 |
34 | 'Remove Copied notation
35 | i = 2
36 | Do
37 | If Worksheets("Master").Cells(i, 3).Value = "Copied" Then
38 | Worksheets("Master").Cells(i, 3).Value = ""
39 | End If
40 | i = i + 1
41 | Loop Until Worksheets("Master").Cells(i, 2).Value = ""
42 |
43 | End If
44 |
45 | 'Copy values to respective group worksheets
46 | i = 2
47 | Do
48 | If Worksheets("Master").Cells(i, 3).Value <> "Copied" Then
49 | targetGroup = Worksheets("Master").Cells(i, 2).Value
50 | name = Worksheets("Master").Cells(i, 1).Value
51 |
52 | 'Determine next available row in group worksheet
53 | targetRow = 2
54 | Do Until Worksheets("Group " & targetGroup).Cells(targetRow, 1).Value = ""
55 | targetRow = targetRow + 1
56 | Loop
57 |
58 | Worksheets("Group " & targetGroup).Cells(targetRow, 1).Value = name
59 | Worksheets("Master").Cells(i, 3).Value = "Copied"
60 | End If
61 | i = i + 1
62 | Loop Until Worksheets("Master").Cells(i, 2).Value = ""
63 |
64 | Worksheets("Master").Activate
65 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/DirectoryList.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 |
3 | Public FSO As New FileSystemObject
4 | Private FileType As Variant
5 | '------------------------------------------------------------------------------
6 |
7 | Sub ListHyperlinkFilesInSubFolders()
8 |
9 | ' Written by Philip Treacy, http://www.myonlinetraininghub.com/author/philipt
10 | ' My Online Training Hub http://www.myonlinetraininghub.com/Create-Hyperlinked-List-of-Files-in-Subfolders
11 | ' May 2014
12 |
13 | Dim StartingCell As String 'Cell where hyperlinked list starts
14 | Dim FSOFolder As Folder
15 | Dim RootFolder As String
16 |
17 | Application.ScreenUpdating = False
18 |
19 | 'Make this a cell address to insert list at fixed cell
20 | 'e.g. StartingCell = "A1"
21 | StartingCell = ActiveCell.Address
22 |
23 |
24 | 'Ask for folder to list files from
25 | With Application.FileDialog(msoFileDialogFolderPicker)
26 |
27 | .InitialFileName = Application.DefaultFilePath & "\"
28 | .Title = "Please select folder to list files from"
29 | .Show
30 |
31 | 'If a folder has been selected
32 | If .SelectedItems.Count <> 0 Then
33 |
34 | RootFolder = .SelectedItems(1)
35 |
36 | Set FSOFolder = FSO.GetFolder(RootFolder)
37 |
38 | 'Ask what type of files to look for
39 | FileType = Application.InputBox("* and ? wildcards are valid " & vbCrLf & vbCrLf & " e.g. .xls* to list XLS, XLSX and XLSM" _
40 | & vbCrLf & vbCrLf & "??st.* to list West.xlsx and East.xlsx" & vbCrLf & vbCrLf & "Just click OK to list all files.", _
41 | "What type of files do you want to list?", "")
42 |
43 | If FileType = False Then 'Cancel pressed
44 |
45 | MsgBox "Process Cancelled"
46 | Exit Sub
47 |
48 | ElseIf FileType = vbNullString Then 'Nothing entered and OK pressed
49 |
50 | FileType = "*.*"
51 |
52 | End If
53 |
54 | 'Clear the active sheet to remove previous results
55 | ActiveSheet.Cells.Clear
56 |
57 | 'Enter default message in case no files are in folder
58 | With Range(StartingCell)
59 |
60 | .ClearFormats
61 | .Value = "No " & FileType & " files found in " & RootFolder
62 | .Select
63 |
64 | End With
65 |
66 | ' Call recursive sub to list files
67 | ListFilesInSubFolders FSOFolder, ActiveCell
68 |
69 | 'Autofit the columns containing our results
70 | Columns.AutoFit
71 |
72 | Else
73 |
74 | 'If no folder selected, admonish user for wasting CPU cycles :)
75 | MsgBox "No folder selected.", vbExclamation
76 |
77 | End If
78 |
79 | End With
80 |
81 | Application.ScreenUpdating = True
82 |
83 | End Sub
84 | '------------------------------------------------------------------------------
85 |
86 |
87 | Sub ListFilesInSubFolders(StartingFolder As Scripting.Folder, DestinationRange As Range)
88 | ' Written by Philip Treacy, http://www.myonlinetraininghub.com/author/philipt
89 | ' My Online Training Hub http://www.myonlinetraininghub.com/Create-Hyperlinked-List-of-Files-in-Subfolders
90 | ' May 2014
91 | ' Lists all files specified by FileType in all subfolders of the StartingFolder object.
92 | ' This sub is called recursively
93 |
94 | Dim CurrentFilename As String
95 | Dim OffsetRow As Long
96 | Dim TargetFiles As String
97 | Dim SubFolder As Scripting.Folder
98 |
99 | 'Write name of folder to cell
100 | DestinationRange.Value = StartingFolder.Path
101 |
102 | 'Get the first file, look for Normal, Read Only, System and Hidden files
103 | TargetFiles = StartingFolder.Path & "\" & FileType
104 |
105 | CurrentFilename = Dir(TargetFiles, 7)
106 |
107 | OffsetRow = 1
108 |
109 | Do While CurrentFilename <> ""
110 |
111 | 'Create the hyperlink
112 | DestinationRange.Offset(OffsetRow).Hyperlinks.Add Anchor:=DestinationRange.Offset(OffsetRow), Address:=StartingFolder.Path & "\" & CurrentFilename, TextToDisplay:=CurrentFilename
113 |
114 | OffsetRow = OffsetRow + 1
115 |
116 | 'Get the next file
117 | CurrentFilename = Dir
118 |
119 | Loop
120 |
121 |
122 | ' Offset the DestinationRange one column to the right and OffsetRows down so that we start listing files
123 | ' inthe next folder below where we just finished. This results in an indented view of the folder structure
124 | Set DestinationRange = DestinationRange.Offset(OffsetRow)
125 |
126 | ' For each SubFolder in the current StartingFolder call ListFilesInSubFolders (recursive)
127 | ' The sub continues to call itself for each and every folder it finds until it has
128 | ' traversed all folders below the original StartingFolder
129 | For Each SubFolder In StartingFolder.SubFolders
130 |
131 | ListFilesInSubFolders SubFolder, DestinationRange
132 |
133 | Next SubFolder
134 |
135 | ' Once all files in SubFolder are listed, move the DestinationRange down 1 row and left 1 column.
136 | ' This gives a clear visual structure to the listing showing that we are done with the current SubFolder
137 | ' and moving on to the next SubFolder
138 | 'Set DestinationRange = DestinationRange.Offset(1)
139 | 'DestinationRange.Select
140 |
141 | End Sub
142 |
143 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/Functions.vb:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "Functions"
2 | Option Explicit
3 |
4 | Private Function GetValue(path, file, sheet, ref)
5 | ' Retrieves a value from a closed workbook
6 | Dim arg As String
7 |
8 | ' Make sure the file exists
9 | If Right(path, 1) <> "\" Then path = path & "\"
10 | If Dir(path & file) = "" Then
11 | GetValue = "File Not Found"
12 | Exit Function
13 | End If
14 |
15 | ' Create the argument
16 | arg = "'" & path & "[" & file & "]" & sheet & "'!" & _
17 | Range(ref).Range("A1").Address(, , xlR1C1)
18 |
19 | ' Execute an XLM macro
20 | GetValue = ExecuteExcel4Macro(arg)
21 | End Function
22 |
23 | Sub TestGetValue()
24 | Dim p As String, f As String
25 | Dim s As String, a As String
26 |
27 | p = ThisWorkbook.path
28 | f = ThisWorkbook.FullName
29 | s = "Sheet2"
30 | a = "C1"
31 | MsgBox GetValue(p, f, s, a)
32 | End Sub
33 |
34 | Sub TestGetValue2()
35 | Dim p As String, f As String
36 | Dim s As String, a As String
37 | Dim r As Long, c As Long
38 |
39 | p = ThisWorkbook.path
40 | f = "myworkbook.xlsx"
41 | s = "Sheet1"
42 | Application.ScreenUpdating = False
43 | For r = 1 To 100
44 | For c = 1 To 12
45 | a = Cells(r, c).Address
46 | Cells(r, c) = GetValue(p, f, s, a)
47 | Next c
48 | Next r
49 | End Sub
50 |
51 | Private Function GetValueByOpeningTheFile(path, file, sheet, ref)
52 | Dim wb As Workbook
53 | Application.ScreenUpdating = False
54 | Set wb = Workbooks.Open(path & Application.PathSeparator & file)
55 | Worksheets(sheet).Activate
56 | GetValueByOpeningTheFile = Range(ref)
57 | wb.Close savechanges:=False
58 | Application.ScreenUpdating = True
59 | End Function
60 |
61 | Sub TestGetValueByOpeningTheFile()
62 | Dim p As String, f As String
63 | Dim s As String, a As String
64 |
65 | p = ThisWorkbook.path
66 | f = "myworkbook.xlsx"
67 | s = "Sheet2"
68 | a = "C1"
69 | MsgBox GetValueByOpeningTheFile(p, f, s, a)
70 | End Sub
71 |
72 | Private Function FileExists(fname) As Boolean
73 | ' Returns TRUE if the file exists
74 | Dim x As String
75 | x = Dir(fname)
76 | If x <> "" Then FileExists = True _
77 | Else FileExists = False
78 | End Function
79 |
80 | Private Function FileNameOnly(pname) As String
81 | ' Returns the filename from a path/filename string
82 | Dim temp As Variant
83 | Length = Len(pname)
84 | temp = Split(pname, Application.PathSeparator)
85 | FileNameOnly = temp(UBound(temp))
86 | End Function
87 |
88 | Private Function PathExists(pname) As Boolean
89 | ' Returns TRUE if the path exists
90 | If Dir(pname, vbDirectory) = "" Then
91 | PathExists = False
92 | Else
93 | PathExists = (GetAttr(pname) And vbDirectory) = vbDirectory
94 | End If
95 | End Function
96 |
97 | Private Function RangeNameExists(nname) As Boolean
98 | ' Returns TRUE if the range name exists
99 | Dim n As Name
100 | RangeNameExists = False
101 | For Each n In ActiveWorkbook.Names
102 | If UCase(n.Name) = UCase(nname) Then
103 | RangeNameExists = True
104 | Exit Function
105 | End If
106 | Next n
107 | End Function
108 |
109 | Private Function SheetExists(sname) As Boolean
110 | ' Returns TRUE if sheet exists in the active workbook
111 | Dim x As Object
112 | On Error Resume Next
113 | Set x = ActiveWorkbook.Sheets(sname)
114 | If Err = 0 Then SheetExists = True _
115 | Else SheetExists = False
116 | End Function
117 |
118 | Private Function WorkbookIsOpen(wbname) As Boolean
119 | ' Returns TRUE if the workbook is open
120 | Dim x As Workbook
121 | On Error Resume Next
122 | Set x = Workbooks(wbname)
123 | If Err = 0 Then WorkbookIsOpen = True _
124 | Else WorkbookIsOpen = False
125 | End Function
126 |
127 | Private Function IsInCollection(Coln As Object, Item As String) As Boolean
128 | Dim Obj As Object
129 | On Error Resume Next
130 | Set Obj = Coln(Item)
131 | IsInCollection = Not Obj Is Nothing
132 | End Function
133 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/HideOnClose.vb:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "HideOnClose"
2 | Option Explicit
3 |
4 | Private Sub Workbook_BeforeClose()
5 | 'OneDrive Sharable link ("https://1drv.ms/f/s!AoLkNBOSNnKygZp2OTAaUkzYjQ_5_A")
6 |
7 | Dim MWb As Workbook
8 | Set MWb = Workbooks("Personal.xlsb")
9 | Dim HFileName As String, WFileName As String
10 | HFileName = "C:\Users\imami\OneDrive\Documents\Shared\Templates\PERSONAL.xlam"
11 | WFileName = "C:\Users\PRPowell\OneNote\Shared\Templates\PERSONAL.xlsb"
12 |
13 |
14 | Debug.Print HFileName, WFileName
15 | Windows("PERSONAL.XLSB").Visible = False
16 | MWb.Save
17 | MWb.SaveCopyAs Filename:=HFileName
18 | 'MWb.SaveCopyAs Filename:=WFileName
19 |
20 | End Sub
21 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/InfoTbl.vb:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "InfoTbl"
2 | Option Explicit
3 |
4 | Sub InfoTbl()
5 | Dim NationalAccounts As String
6 | Dim r As Long
7 | Dim f As String
8 | Dim FileSize As Double
9 |
10 | With ActiveWorkbook.Sheets.Add
11 | .Visible = False
12 | .Name = "Parameters"
13 | Cells(1, 2) = ThisWorkbook.FullName
14 | End With
15 |
16 | r = 1
17 |
18 | Sheets("Parameter Table").Activate
19 | ' Insert headers
20 | Cells.ClearContents
21 | Cells(r, 1) = ThisWorkbook.FullName
22 | Cells(r, 2) = "Files in " & NationalAccounts
23 | Cells(r, 3) = "Size"
24 | Cells(r, 4) = "Date/Time"
25 | Range("A1:C1").Font.Bold = True
26 |
27 | ' Get first file
28 | f = Dir(NationalAccounts, vbReadOnly + vbHidden + vbSystem)
29 | Do While f <> ""
30 | r = r + 1
31 | Cells(r, 1) = f
32 | 'adjust for filesize > 2 gigabytes
33 | FileSize = FileLen(NationalAccounts & f)
34 | If FileSize < 0 Then FileSize = FileSize + 4294967296#
35 | Cells(r, 2) = FileSize
36 | Cells(r, 3) = FileDateTime(NationalAccounts & f)
37 | ' Get next file
38 | f = Dir
39 | Loop
40 |
41 | ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$C$8"), , xlYes).Name = "ParameterTable"
42 |
43 | End Sub
44 |
45 | Sub PrintInfo()
46 |
47 | Debug.Print ThisWorkbook.path
48 | Debug.Print ThisWorkbook.FullName
49 |
50 |
51 | End Sub
52 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/JobCleanxls.vb:
--------------------------------------------------------------------------------
1 | Sub ConvertToXlsx()
2 | Dim FP As String, FN As String, QF As String
3 | Dim TWB As Workbook, Wb As Workbooks
4 | Dim Sh As Sheets
5 | Dim DFP As String
6 |
7 | Application.ScreenUpdating = False
8 | Application.DisplayAlerts = False
9 |
10 | Set TWB = Workbooks("JobCleanXls1.xlsm")
11 |
12 | 'Replace "C:\...." with where you saved the xls files
13 | QF = "C:\Users\prp12.000\OneDrive\prp1277.github.io\_data\[XlsFiles]VBATarget\"
14 |
15 | 'Replace "C:\..." with where you want to save the xlsx files
16 | FP = "C:\Users\prp12.000\OneDrive\prp1277.github.io\_data\QueryFolderTarget\"
17 |
18 |
19 | '1 - Career Builder Analyst File
20 | With Application.Workbooks.Open(QF & "CBAnalyst.xls")
21 | Application.Run "JobCleanXls.xlsm!QuickFormat"
22 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
23 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
24 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
25 | Cells.Hyperlinks.Delete
26 | ActiveWindow.FreezePanes = False
27 | ActiveWorkbook.SaveAs FP & "CBAnalyst.xlsx" _
28 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
29 | ActiveWindow.Close
30 | End With
31 |
32 | '2 - Career Builder Data File
33 | With Application.Workbooks.Open(QF & "CBData.xls")
34 | Application.Run "JobCleanXls.xlsm!QuickFormat"
35 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
36 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
37 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
38 | Cells.Hyperlinks.Delete
39 | ActiveWindow.FreezePanes = False
40 | ActiveWorkbook.SaveAs FP & "CBData.xlsx" _
41 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
42 | ActiveWindow.Close
43 | End With
44 |
45 | '3 - Career Builder Excel File
46 | With Application.Workbooks.Open(QF & "CBExcel.xls")
47 | Application.Run "JobCleanXls.xlsm!QuickFormat"
48 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
49 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
50 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
51 | Cells.Hyperlinks.Delete
52 | ActiveWindow.FreezePanes = False
53 | ActiveWorkbook.SaveAs FP & "CBExcel.xlsx" _
54 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
55 | ActiveWindow.Close
56 | End With
57 |
58 | '4 - Career Builder Financial Analyst File
59 | With Application.Workbooks.Open(QF & "CBFinancialAnalyst.xls")
60 | Application.Run "JobCleanXls.xlsm!QuickFormat"
61 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
62 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
63 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
64 | Cells.Hyperlinks.Delete
65 | ActiveWindow.FreezePanes = False
66 | ActiveWorkbook.SaveAs FP & "CBFinancialAnalyst.xlsx" _
67 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
68 | ActiveWindow.Close
69 | End With
70 |
71 | '5 - Indeed Analyst File
72 | With Application.Workbooks.Open(QF & "INAnalyst.xls")
73 | Application.Run "JobCleanXls.xlsm!QuickFormat"
74 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
75 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
76 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
77 | Cells.Hyperlinks.Delete
78 | ActiveWindow.FreezePanes = False
79 | ActiveWorkbook.SaveAs FP & "INAnalyst.xlsx" _
80 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
81 | ActiveWindow.Close
82 | End With
83 |
84 | '6 - Indeed Data File
85 | With Application.Workbooks.Open(QF & "INData.xls")
86 | Application.Run "JobCleanXls.xlsm!QuickFormat"
87 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
88 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
89 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
90 | Cells.Hyperlinks.Delete
91 | ActiveWindow.FreezePanes = False
92 | ActiveWorkbook.SaveAs FP & "INData.xlsx" _
93 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
94 | ActiveWindow.Close
95 | End With
96 |
97 | '7 - Indeed Excel File
98 | With Application.Workbooks.Open(QF & "INExcel.xls")
99 | Application.Run "JobCleanXls.xlsm!QuickFormat"
100 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
101 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
102 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
103 | Cells.Hyperlinks.Delete
104 | ActiveWindow.FreezePanes = False
105 | ActiveWorkbook.SaveAs FP & "INExcel.xlsx" _
106 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
107 | ActiveWindow.Close
108 | End With
109 |
110 | '8 - Indeed Financial Analyst File
111 | With Application.Workbooks.Open(QF & "INFinancialAnalyst.xls")
112 | Application.Run "JobCleanXls.xlsm!QuickFormat"
113 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
114 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
115 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
116 | Cells.Hyperlinks.Delete
117 | ActiveWindow.FreezePanes = False
118 | ActiveWorkbook.SaveAs FP & "INFinancialAnalyst.xlsx" _
119 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
120 | ActiveWindow.Close
121 | End With
122 |
123 | '9 - US Jobs Analyst File
124 | With Application.Workbooks.Open(QF & "USJAnalyst.xls")
125 | Application.Run "JobCleanXls.xlsm!QuickFormat"
126 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
127 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
128 | ActiveCell.Columns("F:F").EntireColumn.Delete Shift:=xlToLeft
129 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
130 | Cells.Hyperlinks.Delete
131 | ActiveWindow.FreezePanes = False
132 | ActiveWorkbook.SaveAs FP & "USJAnalyst.xlsx" _
133 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
134 | ActiveWindow.Close
135 | End With
136 |
137 | '10 - US Jobs Data File
138 | With Application.Workbooks.Open(QF & "USJData.xls")
139 | Application.Run "JobCleanXls.xlsm!QuickFormat"
140 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
141 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
142 | ActiveCell.Columns("F:F").EntireColumn.Delete Shift:=xlToLeft
143 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
144 | Cells.Hyperlinks.Delete
145 | ActiveWindow.FreezePanes = False
146 | ActiveWorkbook.SaveAs FP & "USJData.xlsx" _
147 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
148 | ActiveWindow.Close
149 | End With
150 |
151 | '11 - US Jobs Excel File
152 | With Application.Workbooks.Open(QF & "USJExcel.xls")
153 | Application.Run "JobCleanXls.xlsm!QuickFormat"
154 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
155 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
156 | ActiveCell.Columns("F:F").EntireColumn.Delete Shift:=xlToLeft
157 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
158 | Cells.Hyperlinks.Delete
159 | ActiveWindow.FreezePanes = False
160 | ActiveWorkbook.SaveAs FP & "USJExcel.xlsx" _
161 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
162 | ActiveWindow.Close
163 | End With
164 |
165 | '12 - US Jobs Financial Analyst File
166 | With Application.Workbooks.Open(QF & "USJFinancialAnalyst.xls")
167 | Application.Run "JobCleanXls.xlsm!QuickFormat"
168 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
169 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
170 | ActiveCell.Columns("F:F").EntireColumn.Delete Shift:=xlToLeft
171 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
172 | Cells.Hyperlinks.Delete
173 | ActiveWindow.FreezePanes = False
174 | ActiveWorkbook.SaveAs FP & "USJFinancialAnalyst.xlsx" _
175 | , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
176 | ActiveWindow.Close
177 | End With
178 |
179 | TWB.Activate
180 |
181 | End Sub
182 |
183 | '---
184 |
185 | Sub FollowLink()
186 | '
187 | ' FollowLink Macro
188 | Dim Wb As Workbook, Wbs As Workbooks
189 | Dim Sh As Worksheet, Shs As Sheets
190 | Dim i As Integer, DFP As String, Tbl As String
191 |
192 | Tbl = ActiveSheet.ListObjects("LinkSiteSearch")
193 | DFP = Application.DefaultFilePath
194 |
195 | Cells(1, 1) = DFP
196 |
197 | 'These 4 lines loop through the table
198 | 'And Open each link in column 1
199 | For i = 1 To Tbl.Range.Rows.Count
200 | Tbl.Range.Columns(1).Select
201 | Selection.Hyperlinks(1).Follow NewWindow:=False, _
202 | AddHistory:=True
203 | Next i
204 |
205 | End Sub
206 |
207 | '---
208 |
209 | Sub QuickFormat()
210 | 'Clear Formatting from all cells
211 | Application.ScreenUpdating = False
212 |
213 | Debug.Print Workbooks(Workbooks.Count).Name
214 | Workbooks(Workbooks.Count).Activate
215 |
216 | With Cells
217 | .HorizontalAlignment = xlLeft
218 | .VerticalAlignment = xlBottom
219 | .WrapText = False
220 | .Orientation = 0
221 | .AddIndent = False
222 | .IndentLevel = 0
223 | .ShrinkToFit = False
224 | .ReadingOrder = xlContext
225 | .MergeCells = False
226 | .Columns.AutoFit
227 | End With
228 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/JobURLCreator.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 | 'This proceedure opens the files from the links, saves
3 | 'them into the folder and cleans them to be ready for
4 | 'the query editor to append them together
5 | Sub FollowLink()
6 | '
7 | ' FollowLink Macro
8 | Application.DisplayAlerts = False
9 | Application.ScreenUpdating = False
10 |
11 | Dim Wb As Workbook, Wbs As Workbooks
12 | Dim Sh As Worksheet, Shs As Sheets, j As Integer
13 | Dim FP As String, FN As String, QF As String
14 | Dim i As Integer, DFP As String, Tbl As ListObject
15 |
16 | 'Set Variables
17 | Set Tbl = Sheets("Links&Locations").ListObjects("LinkSiteSearch")
18 | DFP = Application.DefaultFilePath
19 | QF = "C:\Users\prp12.000\OneDrive\prp1277.github.io\_data\[XlsFiles]VBATarget\"
20 | FP = "C:\Users\prp12.000\OneDrive\prp1277.github.io\_data\QueryFolderTarget\"
21 |
22 | 'Activate, count how many workbooks are open and print default file location
23 | Sheets("Links&Locations").Activate
24 | j = Workbooks.Count
25 | Cells(1, 1) = DFP
26 |
27 | 'These 4 lines loop through the table
28 | 'And Open each link in column 1
29 | For i = 1 To Tbl.Range.Rows.Count
30 | Tbl.Range.Columns(1).Select
31 | Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
32 | Workbooks("JobCleanXLS.xlsm").Sheets("Links&Locations").Activate
33 | Next i
34 |
35 | 'Now, all the workbooks are opened,
36 | 'clean them and save them to the query folder
37 | For i = 1 To (Workbooks.Count - j)
38 | 'Clear the shitty format
39 | Application.Run "JobCleanXls.xlsm!QuickFormat"
40 | 'Delete the stupid picture
41 | ActiveSheet.Shapes.Range(Array("Picture 1")).Delete
42 | 'Why's there a blank column in the first place?
43 | ActiveCell.Columns("A:A").EntireColumn.Delete Shift:=xlToLeft
44 | 'Let alone three blank rows
45 | ActiveCell.Rows("1:3").EntireRow.Delete Shift:=xlUp
46 | 'Delete Hyperlinks because Power Query doesn't see them
47 | Cells.Hyperlinks.Delete
48 | 'Freezing panes is retarded
49 | ActiveWindow.FreezePanes = False
50 | 'Close the window cause we're done with that shit
51 | ActiveWindow.Close
52 | Next i
53 |
54 | Workbooks("JobCleanXLS.xlsm").Activate
55 | End Sub
56 |
57 | -
58 | Sub QuickFormat()
59 | 'Clear Formatting from all cells
60 | Application.ScreenUpdating = False
61 |
62 | Debug.Print Workbooks(Workbooks.Count).Name
63 | Workbooks(Workbooks.Count).Activate
64 | With Cells
65 | .HorizontalAlignment = xlLeft
66 | .VerticalAlignment = xlBottom
67 | .WrapText = False
68 | .Orientation = 0
69 | .AddIndent = False
70 | .IndentLevel = 0
71 | .ShrinkToFit = False
72 | .ReadingOrder = xlContext
73 | .MergeCells = False
74 | .Columns.AutoFit
75 | End With
76 | End Sub
77 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/LoopThroughFileFolder.vb:
--------------------------------------------------------------------------------
1 | Sub LoopAllExcelFilesInFolder()
2 | 'PURPOSE: To loop through all Excel files in a user specified folder and perform a set task on them
3 | 'SOURCE: https://www.thespreadsheetguru.com/the-code-vault/2014/4/23/loop-through-all-excel-files-in-a-given-folder
4 |
5 |
6 | Dim wb As Workbook
7 | Dim myPath As String
8 | Dim myFile As String
9 | Dim myExtension As String
10 | Dim FldrPicker As FileDialog
11 |
12 | 'Optimize Macro Speed
13 | Application.ScreenUpdating = False
14 | Application.EnableEvents = False
15 | Application.Calculation = xlCalculationManual
16 |
17 | 'Retrieve Target Folder Path From User
18 | Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker)
19 |
20 | With FldrPicker
21 | .Title = "Select A Target Folder"
22 | .AllowMultiSelect = False
23 | If .Show <> -1 Then GoTo NextCode
24 | myPath = .SelectedItems(1) & "\"
25 | End With
26 |
27 | 'In Case of Cancel
28 | NextCode:
29 | myPath = myPath
30 | If myPath = "" Then GoTo ResetSettings
31 |
32 | 'Target File Extension (must include wildcard "*")
33 | myExtension = "*.xls*"
34 |
35 | 'Target Path with Ending Extention
36 | myFile = Dir(myPath & myExtension)
37 |
38 | 'Loop through each Excel file in folder
39 | Do While myFile <> ""
40 | 'Set variable equal to opened workbook
41 | Set wb = Workbooks.Open(Filename:=myPath & myFile)
42 |
43 | 'Ensure Workbook has opened before moving on to next line of code
44 | DoEvents
45 |
46 | 'Change First Worksheet's Background Fill Blue
47 | wb.Worksheets(1).Range("A1:Z1").Interior.Color = RGB(51, 98, 174)
48 |
49 | 'Save and Close Workbook
50 | wb.Close SaveChanges:=True
51 |
52 | 'Ensure Workbook has closed before moving on to next line of code
53 | DoEvents
54 |
55 | 'Get next file name
56 | myFile = Dir
57 | Loop
58 |
59 | 'Message Box when tasks are completed
60 | MsgBox "Task Complete!"
61 |
62 | ResetSettings:
63 | 'Reset Macro Optimization Settings
64 | Application.EnableEvents = True
65 | Application.Calculation = xlCalculationAutomatic
66 | Application.ScreenUpdating = True
67 |
68 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/OnTimeRefreshTable.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 | '------------------------------------------------------------------------------
3 | Dim NextTick As Date
4 |
5 | Sub UpdateClock()
6 | '
7 | 'This macro will refresh the query tables every 30 seconds
8 |
9 | ThisWorkbook.Sheets(1).Range("A1") = Time
10 | NextTick = Now + TimeValue("00:00:30")
11 | Application.OnTime NextTick, "UpdateClock"
12 | ThisWorkbook.RefreshAll
13 |
14 | End Sub
15 | '------------------------------------------------------------------------------
16 | Sub StopClock()
17 |
18 | On Error Resume Next
19 | Application.OnTime NextTick, "UpdateClock", , False
20 |
21 | End Sub
22 |
23 | '------------------------------------------------------------------------------
24 | Private Sub Workbook_BeforeClose(Cancel As Boolean)
25 | Call StopClock
26 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/OpenDownloadsFolder.vb:
--------------------------------------------------------------------------------
1 | 1/1/18 - Open from Downloads, delete rows, and format as table
2 |
3 | Option Explicit
4 |
5 | Sub Macro1()
6 | '
7 | ' Macro1 Macro
8 | '
9 |
10 | '
11 | ChDir "C:\Users\imami\Downloads"
12 | Workbooks.Open Filename:="C:\Users\imami\Downloads\transactions (15).csv"
13 | Application.Run "PERSONAL.XLSB!QuickFormat"
14 | Rows("1:12").Select
15 | Selection.Delete Shift:=xlUp
16 | Range("A1").Select
17 | Application.Run "PERSONAL.XLSB!ActiveCellToTable"
18 | ActiveSheet.ListObjects("Table1").Name = "NewTable"
19 | End Sub
20 | ---------------------------------------------------------------------------------------
21 | Sub Macro2()
22 | '
23 | ' Macro2 Macro
24 | '
25 |
26 | '
27 | ChDir "C:\Users\imami\OneDrive\Documents\Resources\Excel"
28 | ActiveWorkbook.SaveAs Filename:= _
29 | "https://d.docs.live.net/b27236921334e482/Documents/Resources/Excel/MacroWorkbook.xlsm" _
30 | , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
31 | End Sub
32 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/PTable.vb:
--------------------------------------------------------------------------------
1 | Sub ParameterTable()
2 | ' ParameterTable Macro
3 |
4 | Range("A1").Value = "parameter"
5 | Range("B1").Value = "value"
6 | Range("A2").Value = "thisNotebook"
7 | Range("B2").Value = "=CELL(""filename"")"
8 |
9 | Range("A1").Activate
10 |
11 | Range(Selection, Selection.End(xlUp)).Select
12 | Range(Selection, Selection.End(xlToRight)).Select
13 | ActiveSheet.ListObjects.Add(xlSrcRange, Range(Selection), , xlYes).Name = _
14 | "config"
15 | ChDir "C:\Users\prp12.000\OneDrive\Apps\Excel"
16 | ActiveWorkbook.SaveAs Filename:= _
17 | "https://d.docs.live.net/b27236921334e482/Apps/Excel/pTable.xlsm", FileFormat _
18 | :=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
19 | End Sub
20 | ' ActiveWorkbook.Queries.Add Name:="config", Formula:= _
21 | ' "let" & Chr(13) & "" & Chr(10) & " Source = Excel.CurrentWorkbook(){[Name=""config""]}[Content]," & Chr(13) & "" & Chr(10) & " #""Changed Type"" = Table.TransformColumnTypes(Source,{{""parameter"", type text}, {""value"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""
22 | ' Workbooks("Book1").Connections.Add2 "Query - config", _
23 | ' "Connection to the 'config' query in the workbook.", _
24 | ' "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=config;Extended Properties=" _
25 | ' , """config""", 6, True, False
26 | ' Range("config[[#Headers],[parameter]]").Select
27 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/PrintAdvancedEditor.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 |
3 | Sub QueryIndex()
4 | 'This macro loops through the workbooks' queries
5 | 'and adds a Query Index page with the M formula
6 | Dim i As Integer
7 | Dim ws As Worksheet
8 | Dim QCount As Integer
9 | Dim QName As String
10 | Dim QForm As String
11 |
12 | Set ws = Worksheets.Add(Before:=Worksheets(1))
13 |
14 | QCount = ActiveWorkbook.Queries.Count
15 |
16 | ws.name = "Query Index"
17 | ws.Cells(1, 1).Value = "Name"
18 | ws.Cells(1, 2).Value = "Query String"
19 |
20 | For i = 1 To QCount
21 | QName = ActiveWorkbook.Queries.Item(i).name
22 | QForm = ActiveWorkbook.Queries.Item(i).Formula
23 | ws.Cells(i + 1, 1).Value = QName
24 | ws.Cells(i + 1, 2).Value = QForm
25 | Next i
26 |
27 | With ActiveSheet.Cells
28 | .HorizontalAlignment = xlLeft
29 | .VerticalAlignment = xlBottom
30 | .WrapText = False
31 | .Orientation = 0
32 | .AddIndent = False
33 | .IndentLevel = 0
34 | .ShrinkToFit = False
35 | .ReadingOrder = xlContext
36 | .MergeCells = False
37 | .Columns.AutoFit
38 | End With
39 | With ActiveSheet.Cells.Font
40 | .name = "Calibri"
41 | .Size = 11
42 | .Strikethrough = False
43 | .Superscript = False
44 | .Subscript = False
45 | .OutlineFont = False
46 | .Shadow = False
47 | .TintAndShade = 0
48 | .ThemeFont = xlThemeFontMinor
49 | End With
50 |
51 | End Sub
52 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/QuickFormat.vb:
--------------------------------------------------------------------------------
1 | Sub QuickFormat()
2 | 'Clear Formatting from all cells
3 | Application.ScreenUpdating = False
4 | Workbooks(Workbooks.Count).Activate
5 |
6 | With Cells
7 | .HorizontalAlignment = xlLeft
8 | .VerticalAlignment = xlBottom
9 | .WrapText = False
10 | .Orientation = 0
11 | .AddIndent = False
12 | .IndentLevel = 0
13 | .ShrinkToFit = False
14 | .ReadingOrder = xlContext
15 | .MergeCells = False
16 | .Columns.AutoFit
17 | End With
18 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/Shortcuts.vb:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "Shortcuts"
2 | Option Explicit
3 |
4 | Sub ZapContents()
5 | Attribute ZapContents.VB_Description = "Clear contents from cells "
6 | Attribute ZapContents.VB_ProcData.VB_Invoke_Func = "Q\n14"
7 | 'ZapContents Macro
8 | 'Clears the contents using active cell, C+S+Right & C+S+Down
9 | Application.ScreenUpdating = False
10 |
11 | ActiveCell.Activate
12 | Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
13 | Selection.ClearContents
14 | Cells.Select
15 | Selection.Columns.AutoFit
16 | End Sub
17 |
18 | Sub QuickFormat()
19 | Attribute QuickFormat.VB_Description = "Autofit, align left and clear wrapped and merged cells"
20 | Attribute QuickFormat.VB_ProcData.VB_Invoke_Func = "M\n14"
21 | 'Clear Formatting from all cells
22 | Application.ScreenUpdating = False
23 |
24 | ThisWorkbook.Activate
25 | Cells.ClearFormats
26 |
27 | With Cells
28 | .HorizontalAlignment = xlLeft
29 | .VerticalAlignment = xlBottom
30 | .WrapText = False
31 | .Orientation = 0
32 | .AddIndent = False
33 | .IndentLevel = 0
34 | .ShrinkToFit = False
35 | .ReadingOrder = xlContext
36 | .MergeCells = False
37 | .Columns.AutoFit
38 | End With
39 | End Sub
40 |
41 | Sub ActiveCellToTable()
42 | Attribute ActiveCellToTable.VB_Description = "Select active cell to last cell and convert to table"
43 | Attribute ActiveCellToTable.VB_ProcData.VB_Invoke_Func = "E\n14"
44 | ' Keyboard Shortcut: Ctrl+Shift+E
45 | Application.ScreenUpdating = False
46 |
47 | Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
48 | ActiveSheet.ListObjects.Add(xlSrcRange, Selection, , xlYes).Name = _
49 | "Table1"
50 | End Sub
51 |
52 | Sub ConvertToHyperlink()
53 | Attribute ConvertToHyperlink.VB_Description = "Convert Active Cell to Hyperlink"
54 | Attribute ConvertToHyperlink.VB_ProcData.VB_Invoke_Func = "H\n14"
55 | 'Keyboard Shortcut Ctrl + Shift + H
56 |
57 | ActiveSheet.Hyperlinks.Add Anchor:=Excel.Selection, Address:= _
58 | ActiveCell.Value, TextToDisplay:=ActiveCell.Value
59 | End Sub
60 |
61 | Private Sub Workbook_BeforeClose()
62 | Dim FP As String
63 | FP = "C:\Users\imami\OneDrive\Documents\Shared\Templates"
64 | Dim FN As String
65 | FN = "\Personal.xlam"
66 |
67 | Windows("PERSONAL.XLSB").Visible = False
68 | ThisWorkbook.Save
69 | Workbooks(1).SaveCopyAs (FP & FN)
70 | '(("C:\Users\imami\OneDrive\Documents\Shared\PERSONAL") & ".xlsm")
71 | End Sub
72 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/VBA.vb:
--------------------------------------------------------------------------------
1 | Sub PivotData()
2 | '
3 | ' PivotFormat Macro
4 | ' Formats the SQL Export into Pivot-Ready data
5 | '
6 |
7 | '
8 | Sheets("Invoices").Select
9 | Range("A5").Select
10 | Range(Selection, Selection.End(xlDown)).Select
11 | Application.CutCopyMode = False
12 | Selection.Copy
13 | Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
14 | :=False, Transpose:=False
15 | Range("B6").Select
16 | Range(Selection, Selection.End(xlDown)).Select
17 | Application.CutCopyMode = False
18 | Selection.TextToColumns Destination:=Range("B6"), DataType:=xlFixedWidth, _
19 | FieldInfo:=Array(Array(0, 9), Array(5, 1)), TrailingMinusNumbers:=True
20 | Range("B5").Select
21 | Sheets.Add
22 | ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
23 | "Invoices!R5C1:R1000C17", Version:=xlPivotTableVersion15).CreatePivotTable _
24 | TableDestination:="Sheet1!R3C1", TableName:="ALLERRORS", DefaultVersion _
25 | :=xlPivotTableVersion15
26 | Sheets("Sheet2").Select
27 | Sheets("Sheet2").Name = "ALL ERRORS"
28 | Sheets("Macro").Select
29 | ActiveWorkbook.SaveCopyAs ("C:\Users\PRPowell\Desktop\Nonshared\Perfect Orders\Kansas City\" & Format("Perfect Order - KC mm.dd.yyy") & ".xlsm")
30 | ActiveWorkbook.Close SaveChanges:=False
31 | Workbooks.Open ("C:\Users\PRPowell\Desktop\Nonshared\Perfect Orders\Kansas City\" & ("Perfect Order - KC mm.dd.yyy"))
32 | End Sub
33 |
34 | -----------------------------------------------------------------------------------------------
35 | Sub ALLERRORS()
36 | '
37 | ' ALL ERRORS Macro
38 | ' Creates the ALLERRORS Table
39 | '
40 |
41 | '
42 | Sheets("ALL ERRORS").Select
43 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("A#")
44 | .Orientation = xlRowField
45 | .Position = 1
46 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("A#")
47 | .PivotItems("").Visible = False
48 | End With
49 | End With
50 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("Customer")
51 | .Orientation = xlRowField
52 | .Position = 2
53 | End With
54 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("Invoice Date")
55 | .Orientation = xlRowField
56 | .Position = 3
57 | End With
58 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("Invoice #")
59 | .Orientation = xlRowField
60 | .Position = 4
61 | End With
62 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("L1 Error")
63 | .Orientation = xlRowField
64 | .Position = 5
65 | End With
66 | ActiveWindow.SmallScroll Down:=3
67 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("Responsible")
68 | .Orientation = xlRowField
69 | .Position = 6
70 | End With
71 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("L1 Error")
72 | .Orientation = xlColumnField
73 | .Position = 1
74 | End With
75 | ActiveSheet.PivotTables("ALLERRORS").AddDataField ActiveSheet.PivotTables( _
76 | "ALLERRORS").PivotFields("L1 Error"), "Count of L1 Error", xlCount
77 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("L1 Error")
78 | .Orientation = xlColumnField
79 | .Position = 1
80 | End With
81 | Range("A4").Select
82 | ActiveSheet.PivotTables("ALLERRORS").Name = "ALLERRORS"
83 | With ActiveSheet.PivotTables("ALLERRORS")
84 | .InGridDropZones = True
85 | .RowAxisLayout xlTabularRow
86 | End With
87 | ActiveSheet.PivotTables("ALLERRORS").PivotFields("Customer").Subtotals = _
88 | Array(False, False, False, False, False, False, False, False, False, False, False, False)
89 | ActiveSheet.PivotTables("ALLERRORS").PivotFields("Invoice Date"). _
90 | Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _
91 | False, False)
92 | ActiveSheet.PivotTables("ALLERRORS").PivotFields("Invoice #").Subtotals _
93 | = Array(False, False, False, False, False, False, False, False, False, False, False, False _
94 | )
95 | ActiveSheet.PivotTables("ALLERRORS").PivotFields("Responsible").Subtotals _
96 | = Array(False, False, False, False, False, False, False, False, False, False, False, False _
97 | )
98 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("Invoice #")
99 | .Orientation = xlRowField
100 | .Position = 3
101 | Sheets("Macro").Select
102 | End With
103 | End Sub
104 |
105 |
106 | -----------------------------------------------------------------------------------------------
107 | Sub ErrorPerCustomer()
108 | '
109 | ' ErrorPerCust Macro
110 | ' Creates the Error/Customer Tab
111 | '
112 |
113 | '
114 | Sheets.Add After:=ActiveSheet
115 | Sheets("Sheet3").Select
116 | Sheets("Sheet3").Name = "# Issues By Customer"
117 | ActiveCell.FormulaR1C1 = "A#"
118 | Range("B1").Select
119 | ActiveCell.FormulaR1C1 = "LOOKUP VALUE"
120 | Range("C1").Select
121 | ActiveCell.FormulaR1C1 = "Customer"
122 | Range("D1").Select
123 | ActiveCell.FormulaR1C1 = "Total"
124 | Range("B2").Select
125 | Sheets("Invoices").Select
126 | Range("A704").Select
127 | Range(Selection, Selection.End(xlUp)).Select
128 | Range("A6:A704").Select
129 | Range("A704").Activate
130 | Selection.Copy
131 | Sheets("# Issues By Customer").Select
132 | Range("A2").Select
133 | ActiveSheet.Paste
134 | Application.CutCopyMode = False
135 | ActiveSheet.Range("$A$1:$A$700").RemoveDuplicates Columns:=1, Header:=xlYes
136 | Range("B2").Select
137 | ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-1],"" "",R1C4)"
138 | Range("B2").Select
139 | Selection.AutoFill Destination:=Range("B2:B329")
140 | Range("B2:B329").Select
141 | Range("C2").Select
142 | ActiveCell.FormulaR1C1 = _
143 | "=VLOOKUP(RC[-1],'ALLERRORS'!R[1]C[-2]:R[538]C[6],2,FALSE)"
144 | Range("C2").Select
145 | Selection.AutoFill Destination:=Range("C2:C329")
146 | Range("C2:C329").Select
147 | ActiveCell.FormulaR1C1 = _
148 | "=VLOOKUP(RC[-2],'ALLERRORS'!R[1]C[-2]:R[538]C[6],2,FALSE)"
149 | Range("C2").Select
150 | Selection.AutoFill Destination:=Range("C2:C329")
151 | Range("C2:C329").Select
152 | ActiveCell.FormulaR1C1 = _
153 | "=VLOOKUP(RC[-2],'ALLERRORS'!R3C1:R540C9,2,FALSE)"
154 | Range("C2").Select
155 | Selection.AutoFill Destination:=Range("C2:C329")
156 | Range("C2:C329").Select
157 | Range("D2").Select
158 | Sheets("ALLERRORS").Select
159 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("A#")
160 | .Orientation = xlRowField
161 | .Position = 1
162 | End With
163 | Sheets("# Issues By Customer").Select
164 | ActiveCell.FormulaR1C1 = _
165 | "=VLOOKUP(RC[-2],'ALLERRORS'!R3C1:R540C9,9,FALSE)"
166 | Range("D2").Select
167 | Selection.AutoFill Destination:=Range("D2:D329")
168 | Range("D2:D329").Select
169 |
170 | End Sub
171 |
172 |
173 | -----------------------------------------------------------------------------------------------
174 | Sub ExecutionErrors()
175 | '
176 | ' ExecutionErrorPivot Macro
177 | ' Creates the Execution Error Pivot Table
178 | '
179 |
180 | '
181 | Sheets.Add
182 | ActiveWorkbook.Worksheets("ALLERRORS").PivotTables("PlatinumPivot"). _
183 | PivotCache.CreatePivotTable TableDestination:="Sheet5!R3C1", TableName:= _
184 | "PivotTable2", DefaultVersion:=xlPivotTableVersion15
185 | Sheets("Sheet5").Select
186 | Cells(3, 1).Select
187 | Sheets("Sheet5").Select
188 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("A#")
189 | .Orientation = xlRowField
190 | .Position = 1
191 | End With
192 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("Customer")
193 | .Orientation = xlRowField
194 | .Position = 2
195 | End With
196 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("Invoice Date")
197 | .Orientation = xlRowField
198 | .Position = 3
199 | End With
200 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("Invoice #")
201 | .Orientation = xlRowField
202 | .Position = 4
203 | End With
204 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("L1 Error")
205 | .PivotItems("Availability Error").Visible = False
206 | .PivotItems("Order Entry Error").Visible = False
207 | .PivotItems("(blank)").Visible = False
208 | End With
209 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("L1 Error")
210 | .Orientation = xlRowField
211 | .Position = 5
212 | End With
213 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("L3 Error")
214 | .Orientation = xlRowField
215 | .Position = 6
216 | End With
217 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("Responsible")
218 | .Orientation = xlRowField
219 | .Position = 7
220 | End With
221 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("L1 Error")
222 | .Orientation = xlPageField
223 | .Position = 1
224 | End With
225 | ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _
226 | "PivotTable2").PivotFields("L3 Error"), "Count of L3 Error", xlCount
227 | With ActiveSheet.PivotTables("PivotTable2").PivotFields("L3 Error")
228 | .Orientation = xlRowField
229 | .Position = 6
230 | End With
231 | Sheets("Sheet5").Name = "Execution Error Pivot"
232 | ActiveSheet.PivotTables("PivotTable2").Name = "ExecutionError"
233 | With ActiveSheet.PivotTables("ExecutionError")
234 | .InGridDropZones = True
235 | .RowAxisLayout xlTabularRow
236 | End With
237 | ActiveSheet.PivotTables("ExecutionError").PivotFields("Customer").Subtotals = _
238 | Array(False, False, False, False, False, False, False, False, False, False, False, False)
239 | ActiveSheet.PivotTables("ExecutionError").PivotFields("Invoice Date"). _
240 | Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _
241 | False, False)
242 | ActiveSheet.PivotTables("ExecutionError").PivotFields("Invoice #").Subtotals _
243 | = Array(False, False, False, False, False, False, False, False, False, False, False, False _
244 | )
245 | ActiveSheet.PivotTables("ExecutionError").PivotFields("Responsible").Subtotals _
246 | = Array(False, False, False, False, False, False, False, False, False, False, False, False _
247 | )
248 | Cells.Select
249 | Cells.EntireColumn.AutoFit
250 | End Sub
251 |
252 |
253 | -----------------------------------------------------------------------------------------------
254 | Sub AvailabilityErrors()
255 | '
256 | ' AvailabilityErrors Macro
257 | ' Creates the Availability Errors Tab and Pivot Table
258 | '
259 |
260 | '
261 | Sheets.Add
262 | ActiveWorkbook.Worksheets("ALLERRORS").PivotTables("PlatinumPivot"). _
263 | PivotCache.CreatePivotTable TableDestination:="Sheet6!R3C1", TableName:= _
264 | "PivotTable3", DefaultVersion:=xlPivotTableVersion15
265 | Sheets("Sheet6").Select
266 | Cells(3, 1).Select
267 | Sheets("Sheet6").Select
268 | Sheets("Sheet6").Name = "Availability Errors"
269 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("A#")
270 | .Orientation = xlRowField
271 | .Position = 1
272 | End With
273 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Customer")
274 | .Orientation = xlRowField
275 | .Position = 2
276 | End With
277 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Invoice Date")
278 | .Orientation = xlRowField
279 | .Position = 3
280 | End With
281 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Invoice #")
282 | .Orientation = xlRowField
283 | .Position = 4
284 | End With
285 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("L1 Error")
286 | .Orientation = xlRowField
287 | .Position = 5
288 | End With
289 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("L1 Error")
290 | .PivotItems("Execution Error").Visible = False
291 | .PivotItems("Order Entry Error").Visible = False
292 | .PivotItems("(blank)").Visible = False
293 | End With
294 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("L3 Error")
295 | .Orientation = xlRowField
296 | .Position = 6
297 | End With
298 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Responsible")
299 | .Orientation = xlRowField
300 | .Position = 7
301 | End With
302 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("L1 Error")
303 | .Orientation = xlPageField
304 | .Position = 1
305 | End With
306 | ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _
307 | "PivotTable3").PivotFields("L3 Error"), "Count of L3 Error", xlCount
308 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Responsible")
309 | .Orientation = xlRowField
310 | .Position = 1
311 | End With
312 | With ActiveSheet.PivotTables("PivotTable3").PivotFields("Customer")
313 | .Orientation = xlRowField
314 | .Position = 2
315 | End With
316 | ActiveSheet.PivotTables("PivotTable3").Name = "AvailabilityErrors"
317 | With ActiveSheet.PivotTables("AvailabilityErrors")
318 | .InGridDropZones = True
319 | .RowAxisLayout xlTabularRow
320 | End With
321 | ActiveSheet.PivotTables("AvailabilityErrors").PivotFields("Customer"). _
322 | Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _
323 | False, False)
324 | ActiveSheet.PivotTables("AvailabilityErrors").PivotFields("A#").Subtotals = _
325 | Array(False, False, False, False, False, False, False, False, False, False, False, False)
326 | ActiveSheet.PivotTables("AvailabilityErrors").PivotFields("Invoice Date"). _
327 | Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _
328 | False, False)
329 | ActiveSheet.PivotTables("AvailabilityErrors").PivotFields("Invoice #"). _
330 | Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _
331 | False, False)
332 | Cells.Select
333 | Cells.EntireColumn.AutoFit
334 | ActiveSheet.PivotTables("AvailabilityErrors").PivotFields("Customer"). _
335 | Subtotals = Array(True, False, False, False, False, False, False, False, False, False, _
336 | False, False)
337 | Cells.EntireColumn.AutoFit
338 | End Sub
339 |
340 | -----------------------------------------------------------------------------------------------
341 | Sub Editor()
342 | '
343 | ' Editor Macro
344 | ' Use this to record macros and refine code
345 | '
346 |
347 | '
348 | With ActiveSheet.PivotTables("ALLERRORS").PivotFields("A#")
349 | .PivotItems("").Visible = False
350 | End With
351 | End Sub
352 |
353 |
354 | -----------------------------------------------------------------------------------------------
355 | Sub BuyerTabsSFD()
356 | '
357 | ' BuyerTabsSFD Macro
358 | ' Copy and Paste the WMSLOT Data to be separated by buyer
359 | '
360 |
361 | '
362 | Sheets("Sheet2").Select
363 | Sheets("Sheet2").Name = "ALL SFD"
364 | Columns("A:A").Select
365 | Range("A2").Activate
366 | Application.CutCopyMode = False
367 | Selection.Delete Shift:=xlToLeft
368 | Selection.Delete Shift:=xlToLeft
369 | Range("A1").Select
370 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1, Criteria1:= _
371 | "Danae Humbard"
372 | Sheets.Add After:=ActiveSheet
373 | Sheets("Sheet1").Select
374 | Sheets("Sheet1").Name = "DANAE"
375 | Sheets("ALL SFD").Select
376 | Range(Selection, Selection.End(xlToRight)).Select
377 | Range(Selection, Selection.End(xlDown)).Select
378 | Selection.Copy
379 | Sheets("DANAE").Select
380 | ActiveSheet.Paste
381 | Cells.Select
382 | Cells.EntireColumn.AutoFit
383 | Application.CutCopyMode = False
384 | Selection.AutoFilter
385 | Cells.EntireColumn.AutoFit
386 | Range("A1").Select
387 | Sheets("ALL SFD").Select
388 | Range("A1").Select
389 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1, Criteria1:= _
390 | "DISCONTINUED"
391 | Range(Selection, Selection.End(xlToRight)).Select
392 | Range(Selection, Selection.End(xlDown)).Select
393 | Selection.Copy
394 | Sheets.Add After:=ActiveSheet
395 | Sheets("Sheet2").Select
396 | Sheets("Sheet2").Name = "MISC."
397 | ActiveSheet.Paste
398 | Cells.Select
399 | Application.CutCopyMode = False
400 | Selection.AutoFilter
401 | Cells.EntireColumn.AutoFit
402 | Range("A1").Select
403 | Sheets("ALL SFD").Select
404 | Range("A1").Select
405 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1, Criteria1:= _
406 | "Penny Reno"
407 | Range(Selection, Selection.End(xlToRight)).Select
408 | Range(Selection, Selection.End(xlDown)).Select
409 | Selection.Copy
410 | Sheets.Add After:=ActiveSheet
411 | Sheets("Sheet3").Select
412 | Sheets("Sheet3").Name = "PENNY"
413 | ActiveSheet.Paste
414 | Cells.Select
415 | Application.CutCopyMode = False
416 | Selection.AutoFilter
417 | Cells.EntireColumn.AutoFit
418 | Range("A1").Select
419 | Sheets("ALL SFD").Select
420 | Range("A1").Select
421 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1, Criteria1:= _
422 | "Todd Kamp"
423 | Range(Selection, Selection.End(xlToRight)).Select
424 | Range(Selection, Selection.End(xlDown)).Select
425 | Selection.Copy
426 | Sheets.Add After:=ActiveSheet
427 | Sheets("Sheet4").Select
428 | Sheets("Sheet4").Name = "TODD"
429 | ActiveSheet.Paste
430 | Cells.Select
431 | Application.CutCopyMode = False
432 | Selection.AutoFilter
433 | Cells.EntireColumn.AutoFit
434 | Range("A1").Select
435 | Sheets("ALL SFD").Select
436 | Range("A1").Select
437 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1, Criteria1:= _
438 | "Vincent Romi"
439 | Range(Selection, Selection.End(xlToRight)).Select
440 | Range(Selection, Selection.End(xlDown)).Select
441 | Selection.Copy
442 | Sheets.Add After:=ActiveSheet
443 | Sheets("Sheet5").Select
444 | Sheets("Sheet5").Name = "VINCENT"
445 | ActiveSheet.Paste
446 | Cells.Select
447 | Application.CutCopyMode = False
448 | Selection.AutoFilter
449 | Selection.ColumnWidth = 8.57
450 | Cells.EntireColumn.AutoFit
451 | Range("A1").Select
452 | Sheets("ALL SFD").Select
453 | Range("A1").Select
454 | ActiveSheet.Range("$A$1:$AS$1053").AutoFilter Field:=1
455 | Sheets("ALL SFD").Select
456 | Range("A1").Select
457 | ActiveWorkbook.SaveCopyAs ("C:\Users\PRPowell\Desktop\NonShared\WMS Aging Files\Springfield\" & Format("120 Day Aging - Springfield mm.dd.yyyy") & ".xlsm")
458 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/VBACode.vb:
--------------------------------------------------------------------------------
1 | VBA Notes and Code
2 |
3 | Public Sub WriteToA1()
4 |
5 | 'Writes 100 to cell A1 in ("Sheet1") in MyVBA.xlm
6 | 'Note that you have to specify the workbook, sheet and range of cells
7 | 'Each are separated by decimals -
8 |
9 | Workbooks("MyVBA.xlm").Worksheets("Sheet1").Range("A1") = 100
10 |
11 | End Sub
12 | -----------------------------------------------------------------------
13 |
14 | Public Sub WriteToMulti()
15 |
16 | 'Uses the same concept as WriteTo__ but allows you to specify what you
17 | 'Want to write in multiple cells at the same time
18 |
19 | 'Writes "John" to cell B1 of wksh "Sheet1" in MyVBA.xlm
20 | Workbooks("MyVBA.xlm").WorkSheets("Sheet1").Range("B1") = "John"
21 |
22 | 'Writes 100 to cell A1 of worksheet "Accounts" in MyVBA.xlm
23 | Workbooks("MyVBA.xlm).Worksheets("Accounts").Range("A1") = 100
24 |
25 | 'Writes the date to cell D3 of worksheet "Sheet2" in Book.xlsc
26 | Workbooks("Boook.xlsx").Worksheets("Sheet2").Range("D3") = "1/1/2017"
27 |
28 | End Sub
29 | -----------------------------------------------------------------------
30 | Using Workbooks
31 |
32 | Public Sub WorkbookProperties()
33 |
34 | 'Prints the number of open workbooks
35 | Debug.Print Workbooks.Count
36 |
37 | 'Prints the full workbook name
38 | Debug.Print Workbooks("Test1.xls").FullName
39 |
40 | 'Displays the full workbook name in a message dialogue
41 | MsgBox Workbooks("Test1.xlsx").FullName
42 |
43 | 'Prints the number of worksheets in Test2.xlsx
44 | Debug.Print Workbooks("Test2.xlsx").Worksheets.Count
45 |
46 | 'Prints the name of the currently active sheet of Test2.xlsx
47 | Debug.Print Workbooks("Test2.xlsx").ActiveSheet.Name
48 |
49 | 'Closes workbooked named Test1.xlsx
50 | Workbooks("Test1.xlsx").Close
51 |
52 | 'Closes workbook Test2.xlsx and saves changes
53 | Workbooks("Test2.xlsx").Close SaveChanges:=True
54 |
55 | End Sub
56 | -----------------------------------------------------------------------
57 | Finding Workbooks
58 |
59 | Public Sub PrintWrkFileName()
60 |
61 | 'This is helpful when you are using loops to specify which one
62 | 'Prints out the full filename of all open workbooks
63 |
64 | Dim wrk As Workbook
65 | For Each wrk In Workbooks
66 | Debug.Print wrk.FullName
67 | Next wrk
68 |
69 | End Sub
70 | ---------------
71 | ALTERNATIVELY.....
72 | ---------------
73 | Public Sub PrintWrkFileNameIdx()
74 |
75 | 'Prints out the full filename of all the open workbooks
76 |
77 | Dim i As Long
78 | For i = 1 To Workbooks.Count
79 | Debug.Print Workbooks(i).FullName
80 | Next i
81 |
82 | End Sub
83 | -----------------------------------------------------------------------
84 | Using Index - Don't
85 |
86 | -----------------------------------------------------------------------
87 | Open Workbooks
88 |
89 | 'The following opens the Workbook "Book1.xlsm" in the "C:\Docs" Folder
90 |
91 | Public Sub OpenWrk()
92 |
93 | 'Opens the WorkBook and prints the number of sheets it contains
94 | Workbooks.Open ("C:\Docs\Book1.xlsm")
95 |
96 | Debug.Print Workbooks("Book1.xlsm").Worksheets.Count
97 |
98 | 'Close the workbook without saving
99 | Workbooks("Book1.xlsm").Close saveChanges:=False
100 |
101 | End Sub
102 | -----------------------------------------------------------------------
103 | Checking if a Workbook Exists
104 |
105 | Public Sub OpenWrkDir()
106 |
107 | If Dir("C:\Docs\Book1.xlsm") = " " Then
108 | 'File does not exist - Inform user
109 | MsgBox "Could not open the workbook. Please check if it exists"
110 | Else
111 | 'Open workbook and do something with it
112 | Workbooks.Open("C:\Docs\Book1.xlsm").Open
113 | End If
114 |
115 | End Sub
116 | -----------------------------------------------------------------------
117 | Checking if a Workbook Is Open
118 | If not, open the workbook
119 |
120 | Function GetWorkbook(ByVal sFullFilename As String) As Workbook
121 |
122 | Dim sFilename As String
123 | sFilename = Dir(sFullFilename)
124 |
125 | On Error Resume Next
126 | Dim wk As Workbook
127 | Set wk = Workbooks(sFilename)
128 |
129 | If wk Is Nothing Then
130 | Set wk = Workbooks.Open(sFullFilename)
131 | End If
132 |
133 | On Error Goto 0
134 | Set GetWorkbook = wk
135 |
136 | End Function
137 |
138 | ---------
139 | Example
140 | ---------
141 |
142 | Sub ExampleOpenWorkbook()
143 |
144 | Dim sFilename As String
145 | sFilename = "C:\Docs\Book2.xlsx"
146 |
147 | Dim wk As Workbook
148 | Set wk = GetWorkbook(sFilename)
149 |
150 | End Sub
151 |
152 | ---------------------------
153 | If the file is already open
154 | ---------------------------
155 |
156 | Function IsWorkbookOpen(FileName As String) As Boolean
157 |
158 | Dim ff As Long, ErrNo As Long
159 | 'Is this used for an unspecified range?
160 |
161 | On Error Resume Next
162 |
163 | 'Open File and store error number
164 | ff = FreeFile()
165 | Open FileName For Input Lock Read As #ff
166 | Close ff
167 | ErrNo = Err
168 | On Error Goto 0
169 |
170 | -----------------------------------------------------------------------
171 |
172 | Close Workbook
173 |
174 | wk.Close
175 |
176 | 'Don't save changes when closing
177 | wk.Close ShaveChanges:= False
178 |
179 | 'Do save changes when closing
180 | wk.Close SaveChanges:= True
181 |
182 | 'Save without closing
183 | wk.Save
184 |
185 | 'Save As function
186 | wk.SaveAs "C:\Users\ima....\Example.xlsm
187 |
188 | 'Save a copy of your workbook
189 | wk.SaveCopyAs "C\Users\ima....\Example.xlsm
190 |
191 | 'Copy a workbook without opening it
192 |
193 | Public Sub CopyWorkbook()
194 | FileCopy "C:\Docs\Docs.xlsm", "C:\Docs\Example_Copy.xlsm"
195 | End Sub
196 | ----------------------------------
197 | 'Save the workbook using the file dialogue
198 | Public Function UserSelectWorkbook() as String
199 |
200 | On Error Goto Error Handler
201 |
202 | Dim sWorkbookName As String
203 |
204 | Dim FD As FileDialog
205 | Set FD = Application.FileDialog(msoFileDialogFilePicker)
206 |
207 | 'Open the file dialog
208 | With FD
209 | 'Set Dialog Title
210 | .Title = "Please Select File"
211 |
212 | 'Add Filter
213 | .Filters.Add "Excel Files", "*.xls;*.xlsx,*.xlsm"
214 |
215 | 'Allow selection of one file only
216 | .AllowMultiSelect = False
217 |
218 | 'Display dialog
219 | .Show
220 |
221 | If FD.SelectedItems.Count > 0 Then
222 | UserSelectWorkbook = FD.SelectedItems(1)
223 | Else
224 | MsgBox "Selecting a file has been cancelled. "
225 | UserSelectWorkbook = " "
226 | End If
227 | End With
228 |
229 | 'Clean up
230 | Set FD = Nothing
231 | Done:
232 | Exit Function
233 | ErrorHandler:
234 | MsgBox "Error: " + Err.Description
235 | End Function
236 | -----------------------------------------------------------------------
237 | Declaring Variables
238 |
239 | Public Sub OpenWrkObjects()
240 |
241 | Dim wrk As Workbook
242 | Set wrk = Workbooks.Open("C:\users\ima....\Book1.xlsm")
243 |
244 | 'Print the number of sheets in each book
245 | Debug.Print wrk.Worksheets.Count
246 | Debug.Print wrk.Name
247 |
248 | wrk.Close
249 |
250 | End Sub
251 | -----------------------------------------------------------------------
252 | Create a New Workbook
253 |
254 | Public Sub AddWorkbook()
255 |
256 | Dim wrk As Workbook
257 | Set wrk = Workbooks.Add
258 |
259 | 'Save as xlsx - default
260 | wrk.SaveAs "C:\Temp\Example.xlsx"
261 |
262 | 'Save as Macro enabled workbook
263 | wrk.SaveAs "C:\Temp\Example.xlsm", xlOpenXMLWorkbookMacroEnabled
264 |
265 | End Sub
266 | -----------------------------------------------------------------------
267 | Using With Keyword
268 |
269 | 'Not using the With keyword
270 |
271 | Public Sub NotUsingWith()
272 |
273 | Debug.Print Workbooks("Book2.xlsm").Worksheets.Count
274 | Debug.Print Workbooks("Book2.xlsm").Name
275 | Debug.Print Workbooks("Book2.xlsm")Worksheets(1)Range("A1")
276 | Workbooks("Book2.xlsm").Close
277 |
278 | End Sub
279 |
280 | 'Using the With keyword to make the code more efficient
281 |
282 | Public Sub UsingWith()
283 |
284 | With Workbooks("Book2.xlsm")
285 | Debug.Print .Worksheets.Count
286 | Debug.Print .Name
287 | Debug.Print .Worksheets(1).Range("A1")
288 | .Close
289 | End With
290 |
291 | End Sub
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
--------------------------------------------------------------------------------
/docs/VBA/scripts/WkBkInfoTable.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 |
3 | Sub InfoTbl()
4 |
5 | Dim Wb As Workbook
6 | Dim Sht As Worksheet
7 | Set Wb = ThisWorkbook
8 | Set Sht = ThisWorkbook.Worksheets(1)
9 |
10 | 'Activate leftmost worksheet and clear the cells
11 | Sht.Activate
12 | Cells.ClearContents
13 |
14 | ' RxC Notation - Column 1, Rows 1 - 5
15 | Cells(1, 1) = "File Name"
16 | Cells(2, 1) = "FilePath"
17 | Cells(3, 1) = "Folder"
18 | Cells(4, 1) = "Sheet Index"
19 | Cells(5, 1) = "Last Updated"
20 |
21 | ' RxC Notation - Column 2, Rows 1 - 5
22 | Cells(1, 2) = Wb.Name ' Filename
23 | Cells(2, 2) = Wb.FullName
24 | Cells(3, 2) = MsoFileDialogView.msoFileDialogViewList
25 | Cells(4, 2) = "=SHEET(A1)"
26 | Cells(5, 2) = "=Now()"
27 |
28 | End Sub
--------------------------------------------------------------------------------
/docs/VBA/scripts/personal.vb:
--------------------------------------------------------------------------------
1 | Option Explicit
2 | '------------------------------------------------------------------------------
3 | Sub ZapContents()
4 | 'ZapContents Macro
5 | 'Clears the contents using active cell, C+S+Right & C+S+Down
6 | Application.ScreenUpdating = False
7 |
8 | ActiveCell.Activate
9 | Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
10 | Selection.ClearContents
11 | Cells.Select
12 | Selection.Columns.AutoFit
13 |
14 | Application.ScreenUpdating = True
15 | End Sub
16 | '------------------------------------------------------------------------------
17 | Sub QuickFormat()
18 | 'Clear Formatting from all cells
19 | 'ctrl+shift+m
20 | Application.ScreenUpdating = False
21 |
22 | With ActiveSheet.Cells
23 | .HorizontalAlignment = xlLeft
24 | .VerticalAlignment = xlBottom
25 | .WrapText = False
26 | .Orientation = 0
27 | .AddIndent = False
28 | .IndentLevel = 0
29 | .ShrinkToFit = False
30 | .ReadingOrder = xlContext
31 | .MergeCells = False
32 | .Columns.AutoFit
33 | End With
34 |
35 | Application.ScreenUpdating = True
36 | End Sub
37 | '------------------------------------------------------------------------------
38 | Sub ActiveCellToTable()
39 | ' Keyboard Shortcut: Ctrl+Shift+E
40 | Application.ScreenUpdating = False
41 |
42 | Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
43 | ActiveSheet.ListObjects.Add(xlSrcRange, Selection, , xlYes).Name = _
44 | "Table1"
45 |
46 | Application.ScreenUpdating = True
47 | End Sub
48 | '------------------------------------------------------------------------------
49 | Sub ConvertToHyperlink()
50 | 'Keyboard Shortcut Ctrl + Shift + H
51 |
52 | ActiveSheet.Hyperlinks.Add Anchor:=Excel.Selection, Address:= _
53 | ActiveCell.Value, TextToDisplay:=ActiveCell.Value
54 |
55 | End Sub
56 | '------------------------------------------------------------------------------
57 | Sub RemoveHyperlinks()
58 | With Cells
59 | .ClearHyperlinks
60 | .ClearFormats
61 | .Font.Color = Default
62 | End With
63 |
64 | Range("A1").Select
65 | Selection.Columns.AutoFit
66 |
67 | End Sub
68 | '------------------------------------------------------------------------------
69 | Sub PasteLinkRight()
70 | ' This macro works as if you used ctrl + r
71 | ' Except it strips the hyperlink and pastes as text
72 | ' Ctrl + Shift + R
73 |
74 | Dim Lnk As String
75 | Lnk = ActiveCell.Offset(0, -1).Hyperlinks(1).Address
76 | With ActiveCell
77 | .Activate
78 | .Value = Lnk
79 | .Offset(0, -1).Hyperlinks(1).Delete
80 | End With
81 |
82 | End Sub
83 |
--------------------------------------------------------------------------------
/docs/csv-datasets/BigBangData.csv:
--------------------------------------------------------------------------------
1 | distance,velocity
2 | 0.032,170
3 | 0.034,290
4 | 0.214,-130
5 | 0.263,-70
6 | 0.275,-185
7 | 0.275,-220
8 | 0.45,200
9 | 0.5,290
10 | 0.5,270
11 | 0.63,200
12 | 0.8,300
13 | 0.9,-30
14 | 0.9,650
15 | 0.9,150
16 | 0.9,500
17 | 1,920
18 | 1.1,450
19 | 1.1,500
20 | 1.4,500
21 | 1.7,960
22 | 2,500
23 | 2,850
24 | 2,800
25 | 2,1090
26 |
--------------------------------------------------------------------------------
/docs/csv-datasets/DirtyData.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/csv-datasets/DirtyData.xlsx
--------------------------------------------------------------------------------
/docs/csv-datasets/GitHubAPI.csv:
--------------------------------------------------------------------------------
1 | {,,,
2 | current_user_url:,"""https//api.github.com/user"",",,"current_user_url:""https//api.github.com/user"","
3 | current_user_authorizations_html_url:,"""https//github.com/settings/connections/applications{/client_id}"",",,"current_user_authorizations_html_url:""https//github.com/settings/connections/applications{/client_id}"","
4 | authorizations_url:,"""https//api.github.com/authorizations"",",,"authorizations_url:""https//api.github.com/authorizations"","
5 | code_search_url:,"""https//api.github.com/search/code?q={query}{&page,per_page,sort,order}"",",,"code_search_url:""https//api.github.com/search/code?q={query}{&page,per_page,sort,order}"","
6 | commit_search_url:,"""https//api.github.com/search/commits?q={query}{&page,per_page,sort,order}"",",,"commit_search_url:""https//api.github.com/search/commits?q={query}{&page,per_page,sort,order}"","
7 | emails_url:,"""https//api.github.com/user/emails"",",,"emails_url:""https//api.github.com/user/emails"","
8 | emojis_url:,"""https//api.github.com/emojis"",",,"emojis_url:""https//api.github.com/emojis"","
9 | events_url:,"""https//api.github.com/events"",",,"events_url:""https//api.github.com/events"","
10 | feeds_url:,"""https//api.github.com/feeds"",",,"feeds_url:""https//api.github.com/feeds"","
11 | followers_url:,"""https//api.github.com/user/followers"",",,"followers_url:""https//api.github.com/user/followers"","
12 | following_url:,"""https//api.github.com/user/following{/target}"",",,"following_url:""https//api.github.com/user/following{/target}"","
13 | gists_url:,"""https//api.github.com/gists{/gist_id}"",",,"gists_url:""https//api.github.com/gists{/gist_id}"","
14 | hub_url:,"""https//api.github.com/hub"",",,"hub_url:""https//api.github.com/hub"","
15 | issue_search_url:,"""https//api.github.com/search/issues?q={query}{&page,per_page,sort,order}"",",,"issue_search_url:""https//api.github.com/search/issues?q={query}{&page,per_page,sort,order}"","
16 | issues_url:,"""https//api.github.com/issues"",",,"issues_url:""https//api.github.com/issues"","
17 | keys_url:,"""https//api.github.com/user/keys"",",,"keys_url:""https//api.github.com/user/keys"","
18 | notifications_url:,"""https//api.github.com/notifications"",",,"notifications_url:""https//api.github.com/notifications"","
19 | organization_repositories_url:,"""https//api.github.com/orgs/{org}/repos{?type,page,per_page,sort}"",",,"organization_repositories_url:""https//api.github.com/orgs/{org}/repos{?type,page,per_page,sort}"","
20 | organization_url:,"""https//api.github.com/orgs/{org}"",",,"organization_url:""https//api.github.com/orgs/{org}"","
21 | public_gists_url:,"""https//api.github.com/gists/public"",",,"public_gists_url:""https//api.github.com/gists/public"","
22 | rate_limit_url:,"""https//api.github.com/rate_limit"",",,"rate_limit_url:""https//api.github.com/rate_limit"","
23 | repository_url:,"""https//api.github.com/repos/{owner}/{repo}"",",,"repository_url:""https//api.github.com/repos/{owner}/{repo}"","
24 | repository_search_url:,"""https//api.github.com/search/repositories?q={query}{&page,per_page,sort,order}"",",,"repository_search_url:""https//api.github.com/search/repositories?q={query}{&page,per_page,sort,order}"","
25 | current_user_repositories_url:,"""https//api.github.com/user/repos{?type,page,per_page,sort}"",",,"current_user_repositories_url:""https//api.github.com/user/repos{?type,page,per_page,sort}"","
26 | starred_url:,"""https//api.github.com/user/starred{/owner}{/repo}"",",,"starred_url:""https//api.github.com/user/starred{/owner}{/repo}"","
27 | starred_gists_url:,"""https//api.github.com/gists/starred"",",,"starred_gists_url:""https//api.github.com/gists/starred"","
28 | team_url:,"""https//api.github.com/teams"",",,"team_url:""https//api.github.com/teams"","
29 | user_url:,"""https//api.github.com/users/{user}"",",,"user_url:""https//api.github.com/users/{user}"","
30 | user_organizations_url:,"""https//api.github.com/user/orgs"",",,"user_organizations_url:""https//api.github.com/user/orgs"","
31 | user_repositories_url:,"""https//api.github.com/users/{user}/repos{?type,page,per_page,sort}"",",,"user_repositories_url:""https//api.github.com/users/{user}/repos{?type,page,per_page,sort}"","
32 | user_search_url:,"""https//api.github.com/search/users?q={query}{&page,per_page,sort,order}""",,"user_search_url:""https//api.github.com/search/users?q={query}{&page,per_page,sort,order}"""
33 | {,,,
34 |
--------------------------------------------------------------------------------
/docs/csv-datasets/README.md:
--------------------------------------------------------------------------------
1 | # Datasets
2 |
3 | ## Files used in my Intro to R class at Rockhurst.
4 |
5 | Good example csv files.
6 |
--------------------------------------------------------------------------------
/docs/csv-datasets/advertising_data.csv:
--------------------------------------------------------------------------------
1 | sales,TV,radio,newspaper
2 | 22.1,230.1,37.8,69.2
3 | 10.4,44.5,39.3,45.1
4 | 9.3,17.2,45.9,69.3
5 | 18.5,151.5,41.3,58.5
6 | 12.9,180.8,10.8,58.4
7 | 7.2,8.7,48.9,75
8 | 11.8,57.5,32.8,23.5
9 | 13.2,120.2,19.6,11.6
10 | 4.8,8.6,2.1,1
11 | 10.6,199.8,2.6,21.2
12 | 8.6,66.1,5.8,24.2
13 | 17.4,214.7,24,4
14 | 9.2,23.8,35.1,65.9
15 | 9.7,97.5,7.6,7.2
16 | 19,204.1,32.9,46
17 | 22.4,195.4,47.7,52.9
18 | 12.5,67.8,36.6,114
19 | 24.4,281.4,39.6,55.8
20 | 11.3,69.2,20.5,18.3
21 | 14.6,147.3,23.9,19.1
22 | 18,218.4,27.7,53.4
23 | 12.5,237.4,5.1,23.5
24 | 5.6,13.2,15.9,49.6
25 | 15.5,228.3,16.9,26.2
26 | 9.7,62.3,12.6,18.3
27 | 12,262.9,3.5,19.5
28 | 15,142.9,29.3,12.6
29 | 15.9,240.1,16.7,22.9
30 | 18.9,248.8,27.1,22.9
31 | 10.5,70.6,16,40.8
32 | 21.4,292.9,28.3,43.2
33 | 11.9,112.9,17.4,38.6
34 | 9.6,97.2,1.5,30
35 | 17.4,265.6,20,0.3
36 | 9.5,95.7,1.4,7.4
37 | 12.8,290.7,4.1,8.5
38 | 25.4,266.9,43.8,5
39 | 14.7,74.7,49.4,45.7
40 | 10.1,43.1,26.7,35.1
41 | 21.5,228,37.7,32
42 | 16.6,202.5,22.3,31.6
43 | 17.1,177,33.4,38.7
44 | 20.7,293.6,27.7,1.8
45 | 12.9,206.9,8.4,26.4
46 | 8.5,25.1,25.7,43.3
47 | 14.9,175.1,22.5,31.5
48 | 10.6,89.7,9.9,35.7
49 | 23.2,239.9,41.5,18.5
50 | 14.8,227.2,15.8,49.9
51 | 9.7,66.9,11.7,36.8
52 | 11.4,199.8,3.1,34.6
53 | 10.7,100.4,9.6,3.6
54 | 22.6,216.4,41.7,39.6
55 | 21.2,182.6,46.2,58.7
56 | 20.2,262.7,28.8,15.9
57 | 23.7,198.9,49.4,60
58 | 5.5,7.3,28.1,41.4
59 | 13.2,136.2,19.2,16.6
60 | 23.8,210.8,49.6,37.7
61 | 18.4,210.7,29.5,9.3
62 | 8.1,53.5,2,21.4
63 | 24.2,261.3,42.7,54.7
64 | 15.7,239.3,15.5,27.3
65 | 14,102.7,29.6,8.4
66 | 18,131.1,42.8,28.9
67 | 9.3,69,9.3,0.9
68 | 9.5,31.5,24.6,2.2
69 | 13.4,139.3,14.5,10.2
70 | 18.9,237.4,27.5,11
71 | 22.3,216.8,43.9,27.2
72 | 18.3,199.1,30.6,38.7
73 | 12.4,109.8,14.3,31.7
74 | 8.8,26.8,33,19.3
75 | 11,129.4,5.7,31.3
76 | 17,213.4,24.6,13.1
77 | 8.7,16.9,43.7,89.4
78 | 6.9,27.5,1.6,20.7
79 | 14.2,120.5,28.5,14.2
80 | 5.3,5.4,29.9,9.4
81 | 11,116,7.7,23.1
82 | 11.8,76.4,26.7,22.3
83 | 12.3,239.8,4.1,36.9
84 | 11.3,75.3,20.3,32.5
85 | 13.6,68.4,44.5,35.6
86 | 21.7,213.5,43,33.8
87 | 15.2,193.2,18.4,65.7
88 | 12,76.3,27.5,16
89 | 16,110.7,40.6,63.2
90 | 12.9,88.3,25.5,73.4
91 | 16.7,109.8,47.8,51.4
92 | 11.2,134.3,4.9,9.3
93 | 7.3,28.6,1.5,33
94 | 19.4,217.7,33.5,59
95 | 22.2,250.9,36.5,72.3
96 | 11.5,107.4,14,10.9
97 | 16.9,163.3,31.6,52.9
98 | 11.7,197.6,3.5,5.9
99 | 15.5,184.9,21,22
100 | 25.4,289.7,42.3,51.2
101 | 17.2,135.2,41.7,45.9
102 | 11.7,222.4,4.3,49.8
103 | 23.8,296.4,36.3,100.9
104 | 14.8,280.2,10.1,21.4
105 | 14.7,187.9,17.2,17.9
106 | 20.7,238.2,34.3,5.3
107 | 19.2,137.9,46.4,59
108 | 7.2,25,11,29.7
109 | 8.7,90.4,0.3,23.2
110 | 5.3,13.1,0.4,25.6
111 | 19.8,255.4,26.9,5.5
112 | 13.4,225.8,8.2,56.5
113 | 21.8,241.7,38,23.2
114 | 14.1,175.7,15.4,2.4
115 | 15.9,209.6,20.6,10.7
116 | 14.6,78.2,46.8,34.5
117 | 12.6,75.1,35,52.7
118 | 12.2,139.2,14.3,25.6
119 | 9.4,76.4,0.8,14.8
120 | 15.9,125.7,36.9,79.2
121 | 6.6,19.4,16,22.3
122 | 15.5,141.3,26.8,46.2
123 | 7,18.8,21.7,50.4
124 | 11.6,224,2.4,15.6
125 | 15.2,123.1,34.6,12.4
126 | 19.7,229.5,32.3,74.2
127 | 10.6,87.2,11.8,25.9
128 | 6.6,7.8,38.9,50.6
129 | 8.8,80.2,0,9.2
130 | 24.7,220.3,49,3.2
131 | 9.7,59.6,12,43.1
132 | 1.6,0.7,39.6,8.7
133 | 12.7,265.2,2.9,43
134 | 5.7,8.4,27.2,2.1
135 | 19.6,219.8,33.5,45.1
136 | 10.8,36.9,38.6,65.6
137 | 11.6,48.3,47,8.5
138 | 9.5,25.6,39,9.3
139 | 20.8,273.7,28.9,59.7
140 | 9.6,43,25.9,20.5
141 | 20.7,184.9,43.9,1.7
142 | 10.9,73.4,17,12.9
143 | 19.2,193.7,35.4,75.6
144 | 20.1,220.5,33.2,37.9
145 | 10.4,104.6,5.7,34.4
146 | 11.4,96.2,14.8,38.9
147 | 10.3,140.3,1.9,9
148 | 13.2,240.1,7.3,8.7
149 | 25.4,243.2,49,44.3
150 | 10.9,38,40.3,11.9
151 | 10.1,44.7,25.8,20.6
152 | 16.1,280.7,13.9,37
153 | 11.6,121,8.4,48.7
154 | 16.6,197.6,23.3,14.2
155 | 19,171.3,39.7,37.7
156 | 15.6,187.8,21.1,9.5
157 | 3.2,4.1,11.6,5.7
158 | 15.3,93.9,43.5,50.5
159 | 10.1,149.8,1.3,24.3
160 | 7.3,11.7,36.9,45.2
161 | 12.9,131.7,18.4,34.6
162 | 14.4,172.5,18.1,30.7
163 | 13.3,85.7,35.8,49.3
164 | 14.9,188.4,18.1,25.6
165 | 18,163.5,36.8,7.4
166 | 11.9,117.2,14.7,5.4
167 | 11.9,234.5,3.4,84.8
168 | 8,17.9,37.6,21.6
169 | 12.2,206.8,5.2,19.4
170 | 17.1,215.4,23.6,57.6
171 | 15,284.3,10.6,6.4
172 | 8.4,50,11.6,18.4
173 | 14.5,164.5,20.9,47.4
174 | 7.6,19.6,20.1,17
175 | 11.7,168.4,7.1,12.8
176 | 11.5,222.4,3.4,13.1
177 | 27,276.9,48.9,41.8
178 | 20.2,248.4,30.2,20.3
179 | 11.7,170.2,7.8,35.2
180 | 11.8,276.7,2.3,23.7
181 | 12.6,165.6,10,17.6
182 | 10.5,156.6,2.6,8.3
183 | 12.2,218.5,5.4,27.4
184 | 8.7,56.2,5.7,29.7
185 | 26.2,287.6,43,71.8
186 | 17.6,253.8,21.3,30
187 | 22.6,205,45.1,19.6
188 | 10.3,139.5,2.1,26.6
189 | 17.3,191.1,28.7,18.2
190 | 15.9,286,13.9,3.7
191 | 6.7,18.7,12.1,23.4
192 | 10.8,39.5,41.1,5.8
193 | 9.9,75.5,10.8,6
194 | 5.9,17.2,4.1,31.6
195 | 19.6,166.8,42,3.6
196 | 17.3,149.7,35.6,6
197 | 7.6,38.2,3.7,13.8
198 | 9.7,94.2,4.9,8.1
199 | 12.8,177,9.3,6.4
200 | 25.5,283.6,42,66.2
201 | 13.4,232.1,8.6,8.7
202 |
--------------------------------------------------------------------------------
/docs/csv-datasets/big_bang_data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/csv-datasets/big_bang_data.xlsx
--------------------------------------------------------------------------------
/docs/csv-datasets/carseats_data.csv:
--------------------------------------------------------------------------------
1 | Location,Sales,Price,Competitor_Price,Income,Advertising,Population,ShelveLoc,Age,Education,Urban,US
2 | 1,15,120,138,73,11,276,Bad,42,17,Yes,Yes
3 | 2,11.22,83,111,48,16,260,Good,65,10,Yes,Yes
4 | 3,10.06,80,113,35,10,269,Medium,59,12,Yes,Yes
5 | 4,7.4,97,117,100,4,466,Medium,55,14,Yes,Yes
6 | 5,4.15,128,141,64,3,340,Bad,38,13,Yes,No
7 | 6,10.81,72,124,113,13,501,Bad,78,16,No,Yes
8 | 7,6.63,108,115,105,0,45,Medium,71,15,Yes,No
9 | 8,11.85,120,136,81,15,425,Good,67,10,Yes,Yes
10 | 9,6.54,124,132,110,0,108,Medium,76,10,No,No
11 | 10,4.69,124,132,113,0,131,Medium,76,17,No,Yes
12 | 11,9.01,100,121,78,9,150,Bad,26,10,No,Yes
13 | 12,11.96,94,117,94,4,503,Good,50,13,Yes,Yes
14 | 13,3.98,136,122,35,2,393,Medium,62,18,Yes,No
15 | 14,10.96,86,115,28,11,29,Good,53,18,Yes,Yes
16 | 15,11.17,118,107,117,11,148,Good,52,18,Yes,Yes
17 | 16,8.71,144,149,95,5,400,Medium,76,18,No,No
18 | 17,7.58,110,118,32,0,284,Good,63,13,Yes,No
19 | 18,12.29,131,147,74,13,251,Good,52,10,Yes,Yes
20 | 19,13.91,68,110,110,0,408,Good,46,17,No,Yes
21 | 20,8.73,121,129,76,16,58,Medium,69,12,Yes,Yes
22 | 21,6.41,131,125,90,2,367,Medium,35,18,Yes,Yes
23 | 22,12.13,109,134,29,12,239,Good,62,18,No,Yes
24 | 23,5.08,138,128,46,6,497,Medium,42,13,Yes,No
25 | 24,5.87,109,121,31,0,292,Medium,79,10,Yes,No
26 | 25,10.14,113,145,119,16,294,Bad,42,12,Yes,Yes
27 | 26,14.9,82,139,32,0,176,Good,54,11,No,No
28 | 27,8.33,131,107,115,11,496,Good,50,11,No,Yes
29 | 28,5.27,107,98,118,0,19,Medium,64,17,Yes,No
30 | 29,2.99,97,103,74,0,359,Bad,55,11,Yes,Yes
31 | 30,7.81,102,104,99,15,226,Bad,58,17,Yes,Yes
32 | 31,13.55,89,125,94,0,447,Good,30,12,Yes,No
33 | 32,8.25,131,136,58,16,241,Medium,44,18,Yes,Yes
34 | 33,6.2,137,107,32,12,236,Good,64,10,No,Yes
35 | 34,8.77,128,114,38,13,317,Good,50,16,Yes,Yes
36 | 35,2.67,128,115,54,0,406,Medium,42,17,Yes,Yes
37 | 36,11.07,96,131,84,11,29,Medium,44,17,No,Yes
38 | 37,8.89,100,122,76,0,270,Good,60,18,No,No
39 | 38,4.95,110,121,41,5,412,Medium,54,10,Yes,Yes
40 | 39,6.59,102,109,73,0,454,Medium,65,15,Yes,No
41 | 40,3.24,138,130,60,0,144,Bad,38,10,No,No
42 | 41,2.07,126,119,98,0,18,Bad,73,17,No,No
43 | 42,7.96,124,157,53,0,403,Bad,58,16,Yes,No
44 | 43,10.43,24,77,69,0,25,Medium,50,18,Yes,No
45 | 44,4.12,134,123,42,11,16,Medium,59,13,Yes,Yes
46 | 45,4.16,95,85,79,6,325,Medium,69,13,Yes,Yes
47 | 46,4.56,135,141,63,0,168,Bad,44,12,Yes,Yes
48 | 47,12.44,70,127,90,14,16,Medium,48,15,No,Yes
49 | 48,4.38,108,126,98,0,173,Bad,55,16,Yes,No
50 | 49,3.91,98,116,52,0,349,Bad,69,18,Yes,No
51 | 50,10.61,149,157,93,0,51,Good,32,17,Yes,No
52 | 51,1.42,108,99,32,18,341,Bad,80,16,Yes,Yes
53 | 52,4.42,108,121,90,0,150,Bad,75,16,Yes,No
54 | 53,7.91,129,153,40,3,112,Bad,39,18,Yes,Yes
55 | 54,6.92,119,109,64,13,39,Medium,61,17,Yes,Yes
56 | 55,4.9,144,134,103,13,25,Medium,76,17,No,Yes
57 | 56,6.85,154,143,81,5,60,Medium,61,18,Yes,Yes
58 | 57,11.91,84,133,82,0,54,Medium,50,17,Yes,No
59 | 58,0.91,117,93,91,0,22,Bad,75,11,Yes,No
60 | 59,5.42,103,103,93,15,188,Bad,74,16,Yes,Yes
61 | 60,5.21,114,118,71,4,148,Medium,80,13,Yes,No
62 | 61,8.32,123,122,102,19,469,Bad,29,13,Yes,Yes
63 | 62,7.32,107,105,32,0,358,Medium,26,13,No,No
64 | 63,1.82,133,139,45,0,146,Bad,77,17,Yes,Yes
65 | 64,8.47,101,119,88,10,170,Medium,61,13,Yes,Yes
66 | 65,7.8,104,100,67,12,184,Medium,32,16,No,Yes
67 | 66,4.9,128,122,26,0,197,Medium,55,13,No,No
68 | 67,8.85,91,127,92,0,508,Medium,56,18,Yes,No
69 | 68,9.01,115,126,61,14,152,Medium,47,16,Yes,Yes
70 | 69,13.39,134,149,69,20,366,Good,60,13,Yes,Yes
71 | 70,7.99,99,127,59,0,339,Medium,65,12,Yes,No
72 | 71,9.46,99,89,81,15,237,Good,74,12,Yes,Yes
73 | 72,6.5,150,148,51,16,148,Medium,58,17,No,Yes
74 | 73,5.52,116,115,45,0,432,Medium,25,15,Yes,No
75 | 74,12.61,104,118,90,10,54,Good,31,11,No,Yes
76 | 75,6.2,136,150,68,5,125,Medium,64,13,No,Yes
77 | 76,8.55,92,88,111,23,480,Bad,36,16,No,Yes
78 | 77,10.64,70,102,87,10,346,Medium,64,15,Yes,Yes
79 | 78,7.7,89,118,71,12,44,Medium,67,18,No,Yes
80 | 79,4.43,145,134,48,1,139,Medium,65,12,Yes,Yes
81 | 80,9.14,90,134,67,0,286,Bad,41,13,Yes,No
82 | 81,8.01,79,113,100,16,353,Bad,68,11,Yes,Yes
83 | 82,7.52,128,116,72,0,237,Good,70,13,Yes,No
84 | 83,11.62,139,151,83,4,325,Good,28,17,Yes,Yes
85 | 84,4.42,94,109,36,7,468,Bad,56,11,Yes,Yes
86 | 85,2.23,121,111,25,0,52,Bad,43,18,No,No
87 | 86,8.47,112,125,103,0,304,Medium,49,13,No,No
88 | 87,8.7,134,150,84,9,432,Medium,64,15,Yes,No
89 | 88,11.7,126,131,67,7,272,Good,54,16,No,Yes
90 | 89,6.56,111,117,42,7,144,Medium,62,10,Yes,Yes
91 | 90,7.95,119,128,66,3,493,Medium,45,16,No,No
92 | 91,5.33,103,115,22,0,491,Medium,64,11,No,No
93 | 92,4.81,107,97,46,11,267,Medium,80,15,Yes,Yes
94 | 93,4.53,125,114,113,0,97,Medium,29,12,Yes,No
95 | 94,8.86,104,145,30,0,67,Medium,55,17,Yes,No
96 | 95,8.39,84,115,97,5,134,Bad,55,11,Yes,Yes
97 | 96,5.58,148,134,25,10,237,Medium,59,13,Yes,Yes
98 | 97,9.48,132,147,42,10,407,Good,73,16,No,Yes
99 | 98,7.45,129,161,82,5,287,Bad,33,16,Yes,Yes
100 | 99,12.49,127,122,77,24,382,Good,36,16,No,Yes
101 | 100,4.88,107,121,47,3,220,Bad,56,16,No,Yes
102 | 101,4.11,106,113,69,11,94,Medium,76,12,No,Yes
103 | 102,6.2,118,128,93,0,89,Medium,34,18,Yes,No
104 | 103,5.3,97,113,22,0,57,Medium,65,16,No,No
105 | 104,5.07,96,123,91,0,334,Bad,78,17,Yes,Yes
106 | 105,4.62,138,121,96,0,472,Medium,51,12,Yes,No
107 | 106,5.55,97,104,100,8,398,Medium,61,11,Yes,Yes
108 | 107,0.16,139,102,33,0,217,Medium,70,18,No,No
109 | 108,8.55,108,134,107,0,104,Medium,60,12,Yes,No
110 | 109,3.47,103,107,79,2,488,Bad,65,16,Yes,No
111 | 110,8.98,90,115,65,0,217,Medium,60,17,No,No
112 | 111,9,116,128,62,7,125,Medium,43,14,Yes,Yes
113 | 112,6.62,151,132,118,12,272,Medium,43,14,Yes,Yes
114 | 113,6.67,125,116,99,5,298,Good,62,12,Yes,Yes
115 | 114,6.01,127,131,29,11,335,Bad,33,12,Yes,Yes
116 | 115,9.31,106,122,87,9,17,Medium,65,13,Yes,Yes
117 | 116,8.54,129,139,35,0,95,Medium,42,13,Yes,No
118 | 117,5.08,128,135,75,0,202,Medium,80,10,No,No
119 | 118,8.8,119,145,53,0,507,Medium,41,12,Yes,No
120 | 119,7.57,99,112,88,2,243,Medium,62,11,Yes,Yes
121 | 120,7.37,128,130,94,8,137,Medium,64,12,Yes,Yes
122 | 121,6.87,131,128,105,11,249,Medium,63,13,Yes,Yes
123 | 122,11.67,87,125,89,10,380,Bad,28,10,Yes,Yes
124 | 123,6.88,108,119,100,5,45,Medium,75,10,Yes,Yes
125 | 124,8.19,155,127,103,0,125,Good,29,15,No,Yes
126 | 125,8.87,120,131,113,0,181,Good,63,14,Yes,No
127 | 126,9.34,49,89,78,0,181,Medium,43,15,No,No
128 | 127,11.27,133,153,68,2,60,Good,59,16,Yes,Yes
129 | 128,6.52,116,125,48,3,192,Medium,51,14,Yes,Yes
130 | 129,4.96,126,133,100,3,350,Bad,55,13,Yes,Yes
131 | 130,4.47,147,143,120,7,279,Bad,40,10,No,Yes
132 | 131,8.41,77,94,84,13,497,Medium,51,12,Yes,Yes
133 | 132,6.5,94,108,69,3,208,Medium,77,16,Yes,No
134 | 133,9.54,136,125,87,9,232,Good,72,10,Yes,Yes
135 | 134,7.62,97,132,98,2,265,Bad,62,12,Yes,Yes
136 | 135,3.67,131,132,31,0,327,Medium,76,16,Yes,No
137 | 136,6.44,120,96,94,14,384,Medium,36,18,No,Yes
138 | 137,5.17,120,131,75,0,10,Bad,31,18,No,No
139 | 138,6.52,118,128,42,0,436,Medium,80,11,Yes,No
140 | 139,10.27,109,125,103,12,371,Medium,44,10,Yes,Yes
141 | 140,12.3,94,146,62,10,310,Medium,30,13,No,Yes
142 | 141,6.03,129,133,60,10,277,Medium,45,18,Yes,Yes
143 | 142,6.53,131,140,42,0,331,Bad,28,15,Yes,No
144 | 143,7.44,104,124,84,0,300,Medium,77,15,Yes,No
145 | 144,0.53,159,122,88,7,36,Bad,28,17,Yes,Yes
146 | 145,9.09,123,132,68,0,264,Good,34,11,No,No
147 | 146,8.77,117,144,63,11,27,Medium,47,17,Yes,Yes
148 | 147,3.9,131,114,83,0,412,Bad,39,14,Yes,No
149 | 148,10.51,119,140,54,9,402,Good,41,16,No,Yes
150 | 149,7.56,97,110,119,0,384,Medium,72,14,No,Yes
151 | 150,11.48,87,121,120,13,140,Medium,56,11,Yes,Yes
152 | 151,10.49,114,122,84,8,176,Good,57,10,No,Yes
153 | 152,10.77,103,111,58,17,407,Good,75,17,No,Yes
154 | 153,7.64,128,128,78,0,341,Good,45,13,No,No
155 | 154,5.93,150,150,36,7,488,Medium,25,17,No,Yes
156 | 155,6.89,110,129,69,10,289,Medium,50,16,No,Yes
157 | 156,7.71,69,98,72,0,59,Medium,65,16,Yes,No
158 | 157,7.49,157,146,34,0,220,Good,51,16,Yes,No
159 | 158,10.21,90,121,58,8,249,Medium,48,13,No,Yes
160 | 159,12.53,112,142,90,1,189,Good,39,10,No,Yes
161 | 160,9.32,70,119,60,0,372,Bad,30,18,No,No
162 | 161,4.67,111,111,28,0,486,Medium,29,12,No,No
163 | 162,2.93,160,143,21,5,81,Medium,67,12,No,Yes
164 | 163,3.63,149,122,74,0,424,Medium,51,13,Yes,No
165 | 164,5.68,106,130,64,0,40,Bad,39,17,No,No
166 | 165,8.22,141,148,64,0,58,Medium,27,13,No,Yes
167 | 166,0.37,191,147,58,7,100,Bad,27,15,Yes,Yes
168 | 167,6.71,137,119,67,17,151,Medium,55,11,Yes,Yes
169 | 168,6.71,93,106,73,0,216,Medium,60,13,Yes,No
170 | 169,7.3,117,129,89,0,425,Medium,45,10,Yes,No
171 | 170,11.48,77,104,41,15,492,Good,73,18,Yes,Yes
172 | 171,8.01,118,128,39,12,356,Medium,71,10,Yes,Yes
173 | 172,12.49,55,93,106,12,416,Medium,75,15,Yes,Yes
174 | 173,9.03,110,104,102,13,123,Good,35,16,Yes,Yes
175 | 174,6.38,128,135,91,5,207,Medium,66,18,Yes,Yes
176 | 175,0,185,139,24,0,358,Medium,79,15,No,No
177 | 176,7.54,122,115,89,0,38,Medium,25,12,Yes,No
178 | 177,5.61,154,138,107,9,480,Medium,47,11,No,Yes
179 | 178,10.48,94,138,72,0,148,Medium,27,17,Yes,Yes
180 | 179,10.66,81,104,71,14,89,Medium,25,14,No,Yes
181 | 180,7.78,116,144,25,3,70,Medium,77,18,Yes,Yes
182 | 181,4.94,149,137,112,15,434,Bad,66,13,Yes,Yes
183 | 182,7.43,91,121,83,0,79,Medium,68,11,Yes,No
184 | 183,4.74,140,137,60,4,230,Bad,25,13,Yes,No
185 | 184,5.32,102,118,74,6,426,Medium,80,18,Yes,Yes
186 | 185,9.95,97,132,33,7,35,Medium,60,11,No,Yes
187 | 186,10.07,107,130,100,11,449,Medium,64,10,Yes,Yes
188 | 187,8.68,86,120,51,0,93,Medium,46,17,No,No
189 | 188,6.03,96,117,32,0,142,Bad,62,17,Yes,No
190 | 189,8.07,90,116,37,0,426,Medium,76,15,Yes,No
191 | 190,12.11,104,118,117,18,509,Medium,26,15,No,Yes
192 | 191,8.79,101,130,37,13,297,Medium,37,13,No,Yes
193 | 192,6.67,173,156,42,13,170,Good,74,14,Yes,Yes
194 | 193,7.56,93,108,26,0,408,Medium,56,14,No,No
195 | 194,13.28,96,139,70,7,71,Good,61,10,Yes,Yes
196 | 195,7.23,128,112,98,18,481,Medium,45,11,Yes,Yes
197 | 196,4.19,112,117,93,4,420,Bad,66,11,Yes,Yes
198 | 197,4.1,133,130,28,6,410,Bad,72,16,Yes,Yes
199 | 198,2.52,138,124,61,0,333,Medium,76,16,Yes,No
200 | 199,3.62,128,112,80,5,500,Medium,69,10,Yes,Yes
201 | 200,6.42,126,122,88,5,335,Medium,64,14,Yes,Yes
202 | 201,5.56,146,144,92,0,349,Medium,62,12,No,No
203 | 202,5.94,134,138,83,0,139,Medium,54,18,Yes,No
204 | 203,4.1,130,121,78,4,413,Bad,46,10,No,Yes
205 | 204,2.05,157,131,82,0,132,Bad,25,14,Yes,No
206 | 205,8.74,124,155,80,0,237,Medium,37,14,Yes,No
207 | 206,5.68,132,113,22,1,317,Medium,28,12,Yes,No
208 | 207,4.97,160,162,67,0,27,Medium,77,17,Yes,Yes
209 | 208,8.19,97,111,105,0,466,Bad,61,10,No,No
210 | 209,7.78,64,86,54,0,497,Bad,33,12,Yes,No
211 | 210,3.02,90,98,21,11,326,Bad,76,11,No,Yes
212 | 211,4.36,123,125,41,2,357,Bad,47,14,No,Yes
213 | 212,9.39,120,117,118,14,445,Medium,32,15,Yes,Yes
214 | 213,12.04,105,145,69,19,501,Medium,45,11,Yes,Yes
215 | 214,8.23,139,149,84,5,220,Medium,33,10,Yes,Yes
216 | 215,4.83,107,115,115,3,48,Medium,73,18,Yes,Yes
217 | 216,2.34,144,116,83,15,170,Bad,71,11,Yes,Yes
218 | 217,5.73,144,141,33,0,243,Medium,34,17,Yes,No
219 | 218,4.34,111,106,44,0,481,Medium,70,14,No,No
220 | 219,9.7,120,138,61,12,156,Medium,25,14,Yes,Yes
221 | 220,10.62,116,116,79,19,359,Good,58,17,Yes,Yes
222 | 221,10.59,124,131,120,15,262,Medium,30,10,Yes,Yes
223 | 222,6.43,107,124,44,0,125,Medium,80,11,Yes,No
224 | 223,7.49,145,136,119,6,178,Medium,35,13,Yes,Yes
225 | 224,3.45,125,110,45,9,276,Medium,62,14,Yes,Yes
226 | 225,4.1,141,134,82,0,464,Medium,48,13,No,No
227 | 226,6.68,82,107,25,0,412,Bad,36,14,Yes,No
228 | 227,7.8,122,119,33,0,245,Good,56,14,Yes,No
229 | 228,8.69,101,113,64,10,68,Medium,57,16,Yes,Yes
230 | 229,5.4,163,149,73,13,381,Bad,26,11,No,Yes
231 | 230,11.19,72,98,104,0,404,Medium,27,18,No,No
232 | 231,5.16,114,115,60,0,119,Bad,38,14,No,No
233 | 232,8.09,122,132,69,0,123,Medium,27,11,No,No
234 | 233,13.14,105,137,80,10,24,Good,61,15,Yes,Yes
235 | 234,8.65,120,123,76,18,218,Medium,29,14,No,Yes
236 | 235,9.43,129,115,62,11,289,Good,56,16,No,Yes
237 | 236,5.53,132,126,32,8,95,Medium,50,17,Yes,Yes
238 | 237,9.32,108,141,34,16,361,Medium,69,10,Yes,Yes
239 | 238,9.62,135,151,28,8,499,Medium,48,10,Yes,Yes
240 | 239,7.36,133,121,24,0,200,Good,73,13,Yes,No
241 | 240,3.89,118,123,105,0,149,Bad,62,16,Yes,Yes
242 | 241,10.31,121,159,80,0,362,Medium,26,18,Yes,No
243 | 242,12.01,94,136,63,0,160,Medium,38,12,Yes,No
244 | 243,4.68,135,124,46,0,199,Medium,52,14,No,No
245 | 244,7.82,110,124,25,13,87,Medium,57,10,Yes,Yes
246 | 245,8.78,100,130,30,0,391,Medium,26,18,Yes,No
247 | 246,10,88,114,43,0,199,Good,57,10,No,Yes
248 | 247,6.9,90,120,56,20,266,Bad,78,18,Yes,Yes
249 | 248,5.04,151,123,114,0,298,Bad,34,16,Yes,No
250 | 249,5.36,101,111,52,0,12,Medium,61,11,Yes,Yes
251 | 250,5.05,117,125,67,0,86,Bad,65,11,Yes,No
252 | 251,9.16,156,137,105,10,435,Good,72,14,Yes,Yes
253 | 252,3.72,132,139,111,5,310,Bad,62,13,Yes,Yes
254 | 253,8.31,117,133,97,0,70,Medium,32,16,Yes,No
255 | 254,5.64,122,124,24,5,288,Medium,57,12,No,Yes
256 | 255,9.58,129,108,104,23,353,Good,37,17,Yes,Yes
257 | 256,7.71,81,123,81,8,198,Bad,80,15,Yes,Yes
258 | 257,4.2,144,147,40,0,277,Medium,73,10,Yes,No
259 | 258,8.67,112,125,62,14,477,Medium,80,13,Yes,Yes
260 | 259,3.47,81,108,38,0,251,Bad,72,14,No,No
261 | 260,5.12,100,123,36,10,467,Bad,74,11,No,Yes
262 | 261,7.67,101,129,117,8,400,Bad,36,10,Yes,Yes
263 | 262,5.71,118,121,42,4,188,Medium,54,15,Yes,Yes
264 | 263,6.37,132,120,77,15,86,Medium,48,18,Yes,Yes
265 | 264,7.77,115,116,26,6,434,Medium,25,17,Yes,Yes
266 | 265,6.95,159,128,29,5,324,Good,31,15,Yes,Yes
267 | 266,5.31,129,130,35,10,402,Bad,39,17,Yes,Yes
268 | 267,9.1,112,128,93,12,343,Good,73,17,No,Yes
269 | 268,5.83,112,134,82,7,473,Bad,51,12,No,Yes
270 | 269,6.53,105,123,57,0,66,Medium,39,11,Yes,No
271 | 270,5.01,166,159,69,0,438,Medium,46,17,Yes,No
272 | 271,11.99,89,119,26,0,284,Good,26,10,Yes,No
273 | 272,4.55,110,111,56,0,504,Medium,62,16,Yes,No
274 | 273,12.98,63,113,33,0,14,Good,38,12,Yes,No
275 | 274,10.04,86,116,106,8,244,Medium,58,12,Yes,Yes
276 | 275,7.22,119,135,93,2,67,Medium,34,11,Yes,Yes
277 | 276,6.67,132,107,119,11,210,Medium,53,11,Yes,Yes
278 | 277,6.93,130,135,69,14,296,Medium,73,15,Yes,Yes
279 | 278,7.8,125,136,48,12,326,Medium,36,16,Yes,Yes
280 | 279,7.22,151,114,113,2,129,Good,40,15,No,Yes
281 | 280,3.42,158,141,57,13,376,Medium,64,18,Yes,Yes
282 | 281,2.86,145,121,86,10,496,Bad,51,10,Yes,Yes
283 | 282,11.19,105,122,69,7,303,Good,45,16,No,Yes
284 | 283,7.74,154,150,96,0,80,Good,61,11,Yes,No
285 | 284,5.36,117,135,110,0,112,Medium,80,16,No,No
286 | 285,6.97,96,106,46,11,414,Bad,79,17,No,No
287 | 286,7.6,131,146,26,11,261,Medium,39,10,Yes,Yes
288 | 287,7.53,113,117,118,11,429,Medium,67,18,No,Yes
289 | 288,6.88,72,95,44,4,208,Bad,44,17,Yes,Yes
290 | 289,6.98,97,116,40,0,74,Medium,76,15,No,No
291 | 290,8.75,156,143,77,25,448,Medium,43,17,Yes,Yes
292 | 291,9.49,103,107,111,14,400,Medium,41,11,No,Yes
293 | 292,6.64,89,118,70,0,106,Bad,39,17,Yes,No
294 | 293,11.82,74,113,66,16,322,Good,76,15,Yes,Yes
295 | 294,11.28,89,123,84,0,74,Good,59,10,Yes,No
296 | 295,12.66,99,148,76,3,126,Good,60,11,Yes,Yes
297 | 296,4.21,137,118,35,14,502,Medium,79,10,No,Yes
298 | 297,8.21,123,127,44,13,160,Good,63,18,Yes,Yes
299 | 298,3.07,104,118,83,13,276,Bad,75,10,Yes,Yes
300 | 299,10.98,130,148,63,0,312,Good,63,15,Yes,No
301 | 300,9.4,96,135,40,17,497,Medium,54,17,No,Yes
302 | 301,8.57,99,116,78,1,158,Medium,45,11,Yes,Yes
303 | 302,7.41,87,99,93,0,198,Medium,57,16,Yes,Yes
304 | 303,5.28,110,108,77,13,388,Bad,74,14,Yes,Yes
305 | 304,10.01,99,133,52,16,290,Medium,43,11,Yes,Yes
306 | 305,11.93,134,123,98,12,408,Good,29,10,Yes,Yes
307 | 306,8.03,132,115,29,26,394,Medium,33,13,Yes,Yes
308 | 307,4.78,133,131,32,1,85,Medium,48,12,Yes,Yes
309 | 308,5.9,120,138,92,0,13,Bad,61,12,Yes,No
310 | 309,9.24,126,126,80,19,436,Medium,52,10,Yes,Yes
311 | 310,11.18,80,131,111,13,33,Bad,68,18,Yes,Yes
312 | 311,9.53,166,175,65,29,419,Medium,53,12,Yes,Yes
313 | 312,6.15,132,146,68,12,328,Bad,51,14,Yes,Yes
314 | 313,6.8,135,137,117,5,337,Bad,38,10,Yes,Yes
315 | 314,9.33,54,103,81,3,491,Medium,66,13,Yes,No
316 | 315,7.72,129,133,33,10,333,Good,71,14,Yes,Yes
317 | 316,6.39,171,131,21,8,220,Good,29,14,Yes,Yes
318 | 317,15.63,72,122,36,5,369,Good,35,10,Yes,Yes
319 | 318,6.41,136,142,30,0,472,Good,80,15,No,No
320 | 319,10.08,130,116,72,10,456,Good,41,14,No,Yes
321 | 320,6.97,129,127,45,19,459,Medium,57,11,No,Yes
322 | 321,5.86,152,136,70,12,171,Medium,44,18,Yes,Yes
323 | 322,7.52,98,123,39,5,499,Medium,34,15,Yes,No
324 | 323,9.16,139,140,50,10,300,Good,60,15,Yes,Yes
325 | 324,10.36,103,107,105,18,428,Medium,34,12,Yes,Yes
326 | 325,2.66,150,136,65,4,133,Bad,53,13,Yes,Yes
327 | 326,11.7,104,144,69,11,131,Medium,47,11,Yes,Yes
328 | 327,4.69,122,133,30,0,152,Medium,53,17,Yes,No
329 | 328,6.23,104,112,38,17,316,Medium,80,16,Yes,Yes
330 | 329,3.15,111,117,66,1,65,Bad,55,11,Yes,Yes
331 | 330,11.27,89,100,54,9,433,Good,45,12,Yes,Yes
332 | 331,4.99,112,122,59,0,501,Bad,32,14,No,No
333 | 332,10.1,134,135,63,15,213,Medium,32,10,Yes,Yes
334 | 333,5.74,104,106,33,20,354,Medium,61,12,Yes,Yes
335 | 334,5.87,147,136,60,7,303,Medium,41,10,Yes,Yes
336 | 335,7.63,83,93,117,9,489,Bad,42,13,Yes,Yes
337 | 336,6.18,110,120,70,15,464,Medium,72,15,Yes,Yes
338 | 337,5.17,143,138,35,6,60,Bad,28,18,Yes,No
339 | 338,8.61,102,130,38,0,283,Medium,80,15,Yes,No
340 | 339,5.97,101,112,24,0,164,Medium,45,11,Yes,No
341 | 340,11.54,126,134,44,4,219,Good,44,15,Yes,Yes
342 | 341,7.5,91,140,29,0,105,Bad,43,16,Yes,No
343 | 342,7.38,93,98,120,0,268,Medium,72,10,No,No
344 | 343,7.81,118,137,102,13,422,Medium,71,10,No,Yes
345 | 344,5.99,121,117,42,10,371,Bad,26,14,Yes,Yes
346 | 345,8.43,126,138,80,0,108,Good,70,13,No,Yes
347 | 346,4.81,149,121,68,0,279,Good,79,12,Yes,No
348 | 347,8.97,125,132,107,0,144,Medium,33,13,No,No
349 | 348,6.88,112,96,39,0,161,Good,27,14,No,No
350 | 349,12.57,107,132,102,20,459,Good,49,11,Yes,Yes
351 | 350,9.32,96,134,27,18,467,Medium,49,14,No,Yes
352 | 351,8.64,91,111,101,17,266,Medium,63,17,No,Yes
353 | 352,10.44,105,124,115,16,458,Medium,62,16,No,Yes
354 | 353,13.44,122,133,103,14,288,Good,61,17,Yes,Yes
355 | 354,9.45,92,107,67,12,430,Medium,35,12,No,Yes
356 | 355,5.3,145,133,31,1,80,Medium,42,18,Yes,Yes
357 | 356,7.02,146,130,100,0,306,Good,42,11,Yes,No
358 | 357,3.58,164,142,109,0,111,Good,72,12,Yes,No
359 | 358,13.36,72,103,73,3,276,Medium,34,15,Yes,Yes
360 | 359,4.17,118,123,96,10,71,Bad,69,11,Yes,Yes
361 | 360,3.13,130,130,62,11,396,Bad,66,14,Yes,Yes
362 | 361,8.77,114,118,86,7,265,Good,52,15,No,Yes
363 | 362,8.68,104,131,25,10,183,Medium,56,15,No,Yes
364 | 363,5.25,110,131,55,0,26,Bad,79,12,Yes,Yes
365 | 364,10.26,108,111,75,1,377,Good,25,12,Yes,No
366 | 365,10.5,131,122,21,16,488,Good,30,14,Yes,Yes
367 | 366,6.53,162,154,30,0,122,Medium,57,17,No,No
368 | 367,5.98,134,124,56,11,447,Medium,53,12,No,Yes
369 | 368,14.37,53,95,106,0,256,Good,52,17,Yes,No
370 | 369,10.71,79,109,22,10,348,Good,74,14,No,Yes
371 | 370,10.26,122,135,100,22,463,Medium,36,14,Yes,Yes
372 | 371,7.68,119,126,41,22,403,Bad,42,12,Yes,Yes
373 | 372,9.08,126,152,81,0,191,Medium,54,16,Yes,No
374 | 373,7.8,98,121,50,0,508,Medium,65,11,No,No
375 | 374,5.58,116,137,71,0,402,Medium,78,17,Yes,No
376 | 375,9.44,118,131,47,7,90,Medium,47,12,Yes,Yes
377 | 376,7.9,124,132,46,4,206,Medium,73,11,Yes,No
378 | 377,16.27,92,141,60,19,319,Good,44,11,Yes,Yes
379 | 378,6.81,125,132,61,0,263,Medium,41,12,No,No
380 | 379,6.11,119,133,88,3,105,Medium,79,12,Yes,Yes
381 | 380,5.81,107,125,111,0,404,Bad,54,15,Yes,No
382 | 381,9.64,89,106,64,10,17,Medium,68,17,Yes,Yes
383 | 382,3.9,151,124,65,21,496,Bad,77,13,Yes,Yes
384 | 383,4.95,121,121,28,19,315,Medium,66,14,Yes,Yes
385 | 384,9.35,68,98,117,0,76,Medium,63,10,Yes,No
386 | 385,12.85,112,123,37,15,348,Good,28,12,Yes,Yes
387 | 386,5.87,132,131,73,13,455,Medium,62,17,Yes,Yes
388 | 387,5.32,160,152,116,0,170,Medium,39,16,Yes,No
389 | 388,8.67,115,142,73,14,238,Medium,73,14,No,Yes
390 | 389,8.14,78,135,89,11,245,Bad,79,16,Yes,Yes
391 | 390,8.44,107,128,42,8,328,Medium,35,12,Yes,Yes
392 | 391,5.47,111,108,75,9,61,Medium,67,12,Yes,Yes
393 | 392,6.1,124,153,63,0,49,Bad,56,16,Yes,No
394 | 393,4.53,130,129,42,13,315,Bad,34,13,Yes,Yes
395 | 394,5.57,120,109,51,10,26,Medium,30,17,No,Yes
396 | 395,5.35,139,130,58,19,366,Bad,33,16,Yes,Yes
397 | 396,12.57,128,138,108,17,203,Good,33,14,Yes,Yes
398 | 397,6.14,120,139,23,3,37,Medium,55,11,No,Yes
399 | 398,7.41,159,162,26,12,368,Medium,40,18,Yes,Yes
400 | 399,5.94,95,100,79,7,284,Bad,50,12,Yes,Yes
401 | 400,9.71,120,134,37,0,27,Good,49,16,Yes,Yes
402 |
--------------------------------------------------------------------------------
/docs/csv-datasets/challenger_data.csv:
--------------------------------------------------------------------------------
1 | launch_id,temp,oring_failures
2 | 1,66,0
3 | 2,70,1
4 | 3,69,0
5 | 4,68,0
6 | 5,67,0
7 | 6,72,0
8 | 7,73,0
9 | 8,70,0
10 | 9,57,1
11 | 10,63,1
12 | 11,70,1
13 | 12,78,0
14 | 13,67,0
15 | 14,53,2
16 | 15,67,0
17 | 16,75,0
18 | 17,70,0
19 | 18,81,0
20 | 19,76,0
21 | 20,79,0
22 | 21,75,0
23 | 22,76,0
24 | 23,58,1
25 |
--------------------------------------------------------------------------------
/docs/csv-datasets/clean_data.csv:
--------------------------------------------------------------------------------
1 | patient_id,medical_expenses,age,bmi
2 | 1,16885,19,27.9
3 | 2,1726,18,33.77
4 | 3,4449,28,33
5 | 4,21984,33,22.705
6 | 5,3867,32,28.88
7 | 6,3757,31,25.74
8 | 7,8241,46,33.44
9 | 8,7282,37,27.74
10 | 9,6406,37,29.83
11 | 10,28923,60,25.84
12 | 11,2721,25,26.22
13 | 12,27809,62,26.29
14 | 13,NA,23,34.4
15 | 14,11091,56,39.82
16 | 15,39612,27,42.13
17 | 16,1837,19,24.6
18 | 17,10797,52,30.78
19 | 18,2395,23,23.845
20 | 19,10602,56,40.3
21 | 20,36837,30,35.3
22 | 21,13229,60,36.005
23 | 22,4150,30,32.4
24 | 23,1137,18,34.1
25 | 24,37702,34,31.92
26 | 25,6204,37,28.025
27 | 26,14001,NA,NA
28 | 27,14452,63,23.085
29 | 28,12269,55,32.775
30 | 29,2775,23,17.385
31 | 30,38711,31,36.3
32 | 31,35586,22,35.6
33 | 32,2198,18,26.315
34 | 33,4688,19,28.6
35 | 34,13770,63,28.31
36 | 35,51195,28,36.4
37 | 36,1625,19,20.425
38 | 37,15612,62,32.965
39 | 38,2302,26,20.8
40 | 39,39774,35,NA
41 | 40,48173,60,39.9
42 | 41,3046,24,26.6
43 | 42,4950,31,36.63
44 | 43,6272,41,21.78
45 | 44,6314,37,30.8
46 | 45,6080,38,37.05
47 | 46,20630,55,37.3
48 | 47,3393,18,38.665
49 | 48,3557,28,34.77
50 | 49,12630,60,24.53
51 | 50,38709,36,35.2
52 | 51,2211,18,35.625
53 | 52,3580,20,NA
54 | 53,23568,48,28
55 | 54,37743,36,34.43
56 | 55,8060,40,28.69
57 | 56,47496,58,36.955
58 | 57,13607,58,31.825
59 | 58,34303,18,31.68
60 | 59,23245,53,22.88
61 | 60,5990,34,37.335
62 | 61,8606,43,27.36
63 | 62,4505,25,33.66
64 | 63,30167,64,24.7
65 | 64,4134,28,25.935
66 | 65,NA,20,NA
67 | 66,1743,19,28.9
68 | 67,14235,61,39.1
69 | 68,6389,40,26.315
70 | 69,5920,40,36.19
71 | 70,17663,28,23.98
72 | 71,16578,27,24.75
73 | 72,6799,31,28.5
74 | 73,11742,53,28.1
75 | 74,11947,58,32.01
76 | 75,7727,44,27.4
77 | 76,11357,57,34.01
78 | 77,3947,29,29.59
79 | 78,1532,NA,35.53
80 | 79,2755,22,39.805
81 | 80,6571,41,32.965
82 | 81,4441,31,26.885
83 | 82,7935,45,38.285
84 | 83,37165,22,37.62
85 | 84,11034,48,41.23
86 | 85,39837,37,34.8
87 | 86,21099,45,22.895
88 | 87,43579,57,31.16
89 | 88,11073,56,27.2
90 | 89,8027,46,27.74
91 | 90,11083,55,26.98
92 | 91,NA,21,39.49
93 | 92,10942,53,24.795
94 | 93,30185,59,29.83
95 | 94,5729,35,34.77
96 | 95,47291,64,31.3
97 | 96,3767,28,37.62
98 | 97,12105,54,30.8
99 | 98,10226,55,38.28
100 | 99,22413,56,19.95
101 | 100,15821,38,19.3
102 |
--------------------------------------------------------------------------------
/docs/csv-datasets/djia_sp500_data.csv:
--------------------------------------------------------------------------------
1 | date,djia,sp500
2 | January 6,12360,1278
3 | January 13,12422,1289
4 | January 20,12720,1315
5 | January 27,12660,1316
6 | February 3,12862,1345
7 | February 10,12801,1343
8 | February 17,12950,1362
9 | February 24,12983,1366
10 | March 2,12978,1370
11 | March 9,12922,1371
12 | March 16,13233,1404
13 | March 23,13081,1397
14 | March 30,13212,1408
15 | April 5,13060,1398
16 | April 13,12850,1370
17 |
--------------------------------------------------------------------------------
/docs/csv-datasets/mini_medexpense_data.csv:
--------------------------------------------------------------------------------
1 | patient_id,medical_expenses,age,bmi
2 | 1,16885,19,27.9
3 | 2,1726,18,33.77
4 | 3,4449,28,33
5 | 4,21984,33,22.705
6 | 5,3867,32,28.88
7 | 6,3757,31,25.74
8 | 7,8241,46,33.44
9 | 8,7282,37,27.74
10 | 9,6406,37,29.83
11 | 10,28923,60,25.84
12 | 11,2721,25,26.22
13 | 12,27809,62,26.29
14 | 13,1827,23,34.4
15 | 14,11091,56,39.82
16 | 15,39612,27,42.13
17 | 16,1837,19,24.6
18 | 17,10797,52,30.78
19 | 18,2395,23,23.845
20 | 19,10602,56,40.3
21 | 20,36837,30,35.3
22 | 21,13229,60,36.005
23 | 22,4150,30,32.4
24 | 23,1137,18,34.1
25 | 24,37702,34,31.92
26 | 25,6204,37,28.025
27 | 26,14001,59,27.72
28 | 27,14452,63,23.085
29 | 28,12269,55,32.775
30 | 29,2775,23,17.385
31 | 30,38711,31,36.3
32 | 31,35586,22,35.6
33 | 32,2198,18,26.315
34 | 33,4688,19,28.6
35 | 34,13770,63,28.31
36 | 35,51195,28,36.4
37 | 36,1625,19,20.425
38 | 37,15612,62,32.965
39 | 38,2302,26,20.8
40 | 39,39774,35,36.67
41 | 40,48173,60,39.9
42 | 41,3046,24,26.6
43 | 42,4950,31,36.63
44 | 43,6272,41,21.78
45 | 44,6314,37,30.8
46 | 45,6080,38,37.05
47 | 46,20630,55,37.3
48 | 47,3393,18,38.665
49 | 48,3557,28,34.77
50 | 49,12630,60,24.53
51 | 50,38709,36,35.2
52 | 51,2211,18,35.625
53 | 52,3580,21,33.63
54 | 53,23568,48,28
55 | 54,37743,36,34.43
56 | 55,8060,40,28.69
57 | 56,47496,58,36.955
58 | 57,13607,58,31.825
59 | 58,34303,18,31.68
60 | 59,23245,53,22.88
61 | 60,5990,34,37.335
62 | 61,8606,43,27.36
63 | 62,4505,25,33.66
64 | 63,30167,64,24.7
65 | 64,4134,28,25.935
66 | 65,14712,20,22.42
67 | 66,1743,19,28.9
68 | 67,14235,61,39.1
69 | 68,6389,40,26.315
70 | 69,5920,40,36.19
71 | 70,17663,28,23.98
72 | 71,16578,27,24.75
73 | 72,6799,31,28.5
74 | 73,11742,53,28.1
75 | 74,11947,58,32.01
76 | 75,7727,44,27.4
77 | 76,11357,57,34.01
78 | 77,3947,29,29.59
79 | 78,1532,21,35.53
80 | 79,2755,22,39.805
81 | 80,6571,41,32.965
82 | 81,4441,31,26.885
83 | 82,7935,45,38.285
84 | 83,37165,22,37.62
85 | 84,11034,48,41.23
86 | 85,39837,37,34.8
87 | 86,21099,45,22.895
88 | 87,43579,57,31.16
89 | 88,11073,56,27.2
90 | 89,8027,46,27.74
91 | 90,11083,55,26.98
92 | 91,2027,21,39.49
93 | 92,10942,53,24.795
94 | 93,30185,59,29.83
95 | 94,5729,35,34.77
96 | 95,47291,64,31.3
97 | 96,3767,28,37.62
98 | 97,12105,54,30.8
99 | 98,10226,55,38.28
100 | 99,22413,56,19.95
101 | 100,15821,38,19.3
102 |
--------------------------------------------------------------------------------
/docs/csv-datasets/murder_data.csv:
--------------------------------------------------------------------------------
1 | murder_rate,population,illiteracy,income,frost,life_expectancy,hs_grad_rate,area
2 | 15.1,3615,2.1,3624,20,69.05,41.3,50708
3 | 11.3,365,1.5,6315,152,69.31,66.7,566432
4 | 7.8,2212,1.8,4530,15,70.55,58.1,113417
5 | 10.1,2110,1.9,3378,65,70.66,39.9,51945
6 | 10.3,21198,1.1,5114,20,71.71,62.6,156361
7 | 6.8,2541,0.7,4884,166,72.06,63.9,103766
8 | 3.1,3100,1.1,5348,139,72.48,56,4862
9 | 6.2,579,0.9,4809,103,70.06,54.6,1982
10 | 10.7,8277,1.3,4815,11,70.66,52.6,54090
11 | 13.9,4931,2,4091,60,68.54,40.6,58073
12 | 6.2,868,1.9,4963,0,73.6,61.9,6425
13 | 5.3,813,0.6,4119,126,71.87,59.5,82677
14 | 10.3,11197,0.9,5107,127,70.14,52.6,55748
15 | 7.1,5313,0.7,4458,122,70.88,52.9,36097
16 | 2.3,2861,0.5,4628,140,72.56,59,55941
17 | 4.5,2280,0.6,4669,114,72.58,59.9,81787
18 | 10.6,3387,1.6,3712,95,70.1,38.5,39650
19 | 13.2,3806,2.8,3545,12,68.76,42.2,44930
20 | 2.7,1058,0.7,3694,161,70.39,54.7,30920
21 | 8.5,4122,0.9,5299,101,70.22,52.3,9891
22 | 3.3,5814,1.1,4755,103,71.83,58.5,7826
23 | 11.1,9111,0.9,4751,125,70.63,52.8,56817
24 | 2.3,3921,0.6,4675,160,72.96,57.6,79289
25 | 12.5,2341,2.4,3098,50,68.09,41,47296
26 | 9.3,4767,0.8,4254,108,70.69,48.8,68995
27 | 5,746,0.6,4347,155,70.56,59.2,145587
28 | 2.9,1544,0.6,4508,139,72.6,59.3,76483
29 | 11.5,590,0.5,5149,188,69.03,65.2,109889
30 | 3.3,812,0.7,4281,174,71.23,57.6,9027
31 | 5.2,7333,1.1,5237,115,70.93,52.5,7521
32 | 9.7,1144,2.2,3601,120,70.32,55.2,121412
33 | 10.9,18076,1.4,4903,82,70.55,52.7,47831
34 | 11.1,5441,1.8,3875,80,69.21,38.5,48798
35 | 1.4,637,0.8,5087,186,72.78,50.3,69273
36 | 7.4,10735,0.8,4561,124,70.82,53.2,40975
37 | 6.4,2715,1.1,3983,82,71.42,51.6,68782
38 | 4.2,2284,0.6,4660,44,72.13,60,96184
39 | 6.1,11860,1,4449,126,70.43,50.2,44966
40 | 2.4,931,1.3,4558,127,71.9,46.4,1049
41 | 11.6,2816,2.3,3635,65,67.96,37.8,30225
42 | 1.7,681,0.5,4167,172,72.08,53.3,75955
43 | 11,4173,1.7,3821,70,70.11,41.8,41328
44 | 12.2,12237,2.2,4188,35,70.9,47.4,262134
45 | 4.5,1203,0.6,4022,137,72.9,67.3,82096
46 | 5.5,472,0.6,3907,168,71.64,57.1,9267
47 | 9.5,4981,1.4,4701,85,70.08,47.8,39780
48 | 4.3,3559,0.6,4864,32,71.72,63.5,66570
49 | 6.7,1799,1.4,3617,100,69.48,41.6,24070
50 | 3,4589,0.7,4468,149,72.48,54.5,54464
51 | 6.9,376,0.6,4566,173,70.29,62.9,97203
52 |
--------------------------------------------------------------------------------
/docs/csv-datasets/occupational_prestige_data.csv:
--------------------------------------------------------------------------------
1 | occupational_type,prestige,education,income,percentage_of_women,professional
2 | gov.administrators,68.8,13.11,12351,11.16,yes
3 | general.managers,69.1,12.26,25879,4.02,yes
4 | accountants,63.4,12.77,9271,15.7,yes
5 | purchasing.officers,56.8,11.42,8865,9.11,yes
6 | chemists,73.5,14.62,8403,11.68,yes
7 | physicists,77.6,15.64,11030,5.13,yes
8 | biologists,72.6,15.09,8258,25.65,yes
9 | architects,78.1,15.44,14163,2.69,yes
10 | civil.engineers,73.1,14.52,11377,1.03,yes
11 | mining.engineers,68.8,14.64,11023,0.94,yes
12 | surveyors,62,12.39,5902,1.91,yes
13 | draughtsmen,60,12.3,7059,7.83,yes
14 | computer.programers,53.8,13.83,8425,15.33,yes
15 | economists,62.2,14.44,8049,57.31,yes
16 | psychologists,74.9,14.36,7405,48.28,yes
17 | social.workers,55.1,14.21,6336,54.77,yes
18 | lawyers,82.3,15.77,19263,5.13,yes
19 | librarians,58.1,14.15,6112,77.1,yes
20 | vocational.counsellors,58.3,15.22,9593,34.89,yes
21 | ministers,72.8,14.5,4686,4.14,yes
22 | university.teachers,84.6,15.97,12480,19.59,yes
23 | primary.school.teachers,59.6,13.62,5648,83.78,yes
24 | secondary.school.teachers,66.1,15.08,8034,46.8,yes
25 | physicians,87.2,15.96,25308,10.56,yes
26 | veterinarians,66.7,15.94,14558,4.32,yes
27 | osteopaths.chiropractors,68.4,14.71,17498,6.91,yes
28 | nurses,64.7,12.46,4614,96.12,yes
29 | nursing.aides,34.9,9.45,3485,76.14,no
30 | physio.therapsts,72.1,13.62,5092,82.66,yes
31 | pharmacists,69.3,15.21,10432,24.71,yes
32 | medical.technicians,67.5,12.79,5180,76.04,no
33 | commercial.artists,57.2,11.09,6197,21.03,yes
34 | radio.tv.announcers,57.6,12.71,7562,11.15,no
35 | athletes,54.1,11.44,8206,8.13,no
36 | secretaries,46,11.59,4036,97.51,no
37 | typists,41.9,11.49,3148,95.97,no
38 | bookkeepers,49.4,11.32,4348,68.24,no
39 | tellers.cashiers,42.3,10.64,2448,91.76,no
40 | computer.operators,47.7,11.36,4330,75.92,no
41 | shipping.clerks,30.9,9.17,4761,11.37,no
42 | file.clerks,32.7,12.09,3016,83.19,no
43 | receptionsts,38.7,11.04,2901,92.86,no
44 | mail.carriers,36.1,9.22,5511,7.62,no
45 | postal.clerks,37.2,10.07,3739,52.27,no
46 | telephone.operators,38.1,10.51,3161,96.14,no
47 | collectors,29.4,11.2,4741,47.06,no
48 | claim.adjustors,51.1,11.13,5052,56.1,no
49 | travel.clerks,35.7,11.43,6259,39.17,no
50 | office.clerks,35.6,11,4075,63.23,no
51 | sales.supervisors,41.5,9.84,7482,17.04,no
52 | commercial.travellers,40.2,11.13,8780,3.16,no
53 | sales.clerks,26.5,10.05,2594,67.82,no
54 | newsboys,14.8,9.62,918,7,no
55 | service.station.attendant,23.3,9.93,2370,3.69,no
56 | insurance.agents,47.3,11.6,8131,13.09,no
57 | real.estate.salesmen,47.1,11.09,6992,24.44,no
58 | buyers,51.1,11.03,7956,23.88,no
59 | firefighters,43.5,9.47,8895,0,no
60 | policemen,51.6,10.93,8891,1.65,no
61 | cooks,29.7,7.74,3116,52,no
62 | bartenders,20.2,8.5,3930,15.51,no
63 | funeral.directors,54.9,10.57,7869,6.01,no
64 | babysitters,25.9,9.46,611,96.53,no
65 | launderers,20.8,7.33,3000,69.31,no
66 | janitors,17.3,7.11,3472,33.57,no
67 | elevator.operators,20.1,7.58,3582,30.08,no
68 | farmers,44.1,6.84,3643,3.6,no
69 | farm.workers,21.5,8.6,1656,27.75,no
70 | rotary.well.drillers,35.3,8.88,6860,0,no
71 | bakers,38.9,7.54,4199,33.3,no
72 | slaughterers.1,25.2,7.64,5134,17.26,no
73 | slaughterers.2,34.8,7.64,5134,17.26,no
74 | canners,23.2,7.42,1890,72.24,no
75 | textile.weavers,33.3,6.69,4443,31.36,no
76 | textile.labourers,28.8,6.74,3485,39.48,no
77 | tool.die.makers,42.5,10.09,8043,1.5,no
78 | machinists,44.2,8.81,6686,4.28,no
79 | sheet.metal.workers,35.9,8.4,6565,2.3,no
80 | welders,41.8,7.92,6477,5.17,no
81 | auto.workers,35.9,8.43,5811,13.62,no
82 | aircraft.workers,43.7,8.78,6573,5.78,no
83 | electronic.workers,50.8,8.76,3942,74.54,no
84 | radio.tv.repairmen,37.2,10.29,5449,2.92,no
85 | sewing.mach.operators,28.2,6.38,2847,90.67,no
86 | auto.repairmen,38.1,8.1,5795,0.81,no
87 | aircraft.repairmen,50.3,10.1,7716,0.78,no
88 | railway.sectionmen,27.3,6.67,4696,0,no
89 | electrical.linemen,40.9,9.05,8316,1.34,no
90 | electricians,50.2,9.93,7147,0.99,no
91 | construction.foremen,51.1,8.24,8880,0.65,no
92 | carpenters,38.9,6.92,5299,0.56,no
93 | masons,36.2,6.6,5959,0.52,no
94 | house.painters,29.9,7.81,4549,2.46,no
95 | plumbers,42.9,8.33,6928,0.61,no
96 | construction.labourers,26.5,7.52,3910,1.09,no
97 | pilots,66.1,12.27,14032,0.58,yes
98 | train.engineers,48.9,8.49,8845,0,no
99 | bus.drivers,35.9,7.58,5562,9.47,no
100 | taxi.drivers,25.1,7.93,4224,3.59,no
101 | longshoremen,26.1,8.37,4753,0,no
102 | typesetters,42.2,10,6462,13.58,no
103 | bookbinders,35.2,8.55,3617,70.87,no
104 |
--------------------------------------------------------------------------------
/docs/csv-datasets/phone_service_data.csv:
--------------------------------------------------------------------------------
1 | customers,line_maintenance_expense
2 | 25.3,484.6
3 | 36.4,672.3
4 | 37.9,839.4
5 | 45.9,694.9
6 | 53.4,836.4
7 | 66.8,681.9
8 | 78.4,1037
9 | 82.6,1095.6
10 | 93.8,1563.1
11 | 97.5,1377.9
12 | 105.7,1711.7
13 | 124.3,2138.6
14 |
--------------------------------------------------------------------------------
/docs/csv-datasets/sharpe_data.csv:
--------------------------------------------------------------------------------
1 | mutual_fund_name,return,risk
2 | Affiliated Fund,14.6,15.3
3 | American Buisness Shares,10,9.2
4 | "Axe-Houghton, Fund A",10.5,13.5
5 | "Axe-Houghton, Fund B",12,16.3
6 | "Axe-Houghton, Stock Fund",11.9,15.6
7 | Bosten Fund,12.4,12.1
8 | Board Street Investing,14.8,16.8
9 | Bullock Fund,15.7,19.3
10 | Commonwealth Investment Company,10.9,13.7
11 | Delaware Fund,14.4,21.4
12 | Dividen Shares,14.4,15.9
13 | Eaton and Howard Balanced Fund,11,11.9
14 | Eaton and Howard Stock Fund,15.2,19.2
15 | Equity Fund,14.6,18.7
16 | Fidelity Fund,16.4,23.5
17 | Financial Industrial Fund,14.5,23
18 | Fundamental Investors,16,21.7
19 | "Group Securities, Common Stock Fund",15.1,19.1
20 | "Group Securities, Fully Administered Fund",11.4,14.1
21 | Incorporated Investors,14,25.5
22 | Investment Company of America,17.4,21.8
23 | Investors Mutual,11.3,12.5
24 | Loomis-Sales Mutual Fund,10,10.4
25 | Massachusetts Investors Trust,16.2,20.8
26 | Massachusetts Investors - Growth Stock,18.6,22.7
27 | National Investors Corporation,18.3,19.9
28 | National Securities - Income Series,12.4,17.8
29 | New England Fund,10.4,10.2
30 | Putnam Fund of Boston,13.1,16
31 | "Scudder, Stevens & Clark Balanced Fund",10.7,13.3
32 | Selected American Shares,14.4,19.4
33 | United Funds - Income Funds,16.1,20.9
34 | Wellington Fund,11.3,12
35 | Wisconsin Fund,13.8,16.9
36 |
--------------------------------------------------------------------------------
/docs/csv-datasets/toyota_corolla_data.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/csv-datasets/toyota_corolla_data.csv
--------------------------------------------------------------------------------
/docs/images/CatastrophicFail.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/images/CatastrophicFail.jpg
--------------------------------------------------------------------------------
/docs/images/ExcelToCode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/images/ExcelToCode.png
--------------------------------------------------------------------------------
/docs/images/excel-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/images/excel-icon.png
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Index for Excel
8 |
9 |
11 |
12 |
13 |
15 |
16 |
17 |
20 |
21 |
22 |
23 | Excel 54.59 MB (153 files, 30 folders)
24 |
25 |
26 | - .editorconfig 202 B
27 | - .gitignore 5.80 KB
28 | - _config.yml 25 B
29 | - LICENSE 1.07 KB
30 | - README.md 848 B
31 | - renovate.json 46 B
32 |
33 |
docs 54.58 MB (147 files, 29 folders)
34 |
35 |
csv-datasets 4.98 MB (23 files)
36 |
37 |
38 | - advertising_data.csv 3.97 KB
39 | - airfares_data.csv 83.81 KB
40 | - auto_data.csv 18.88 KB
41 | - big_bang_data.xlsx 20.02 KB
42 | - BigBangData.csv 243 B
43 | - boston_data.csv 36.25 KB
44 | - carseats_data.csv 18.10 KB
45 | - challenger_data.csv 229 B
46 | - clean_data.csv 1.81 KB
47 | - credit_card_data.csv 203.63 KB
48 | - DirtyData.xlsx 15.29 KB
49 | - djia_sp500_data.csv 347 B
50 | - GitHubAPI.csv 4.20 KB
51 | - medexpense_data.csv 29.77 KB
52 | - MedExpenseData.csv 29.77 KB
53 | - mini_medexpense_data.csv 1.83 KB
54 | - murder_data.csv 2.00 KB
55 | - occupational_prestige_data.csv 4.03 KB
56 | - phone_service_data.csv 186 B
57 | - README.md 93 B
58 | - sharpe_data.csv 1.19 KB
59 | - toyota_corolla_data.csv 221.61 KB
60 | - zip_code_database.csv 4.30 MB
61 |
62 |
63 |
images 68.66 KB (3 files)
64 |
65 |
66 | - CatastrophicFail.jpg 8.55 KB
67 | - excel-icon.png 6.95 KB
68 | - ExcelToCode.png 53.16 KB
69 |
70 |
71 |
misc 18.27 KB (2 files)
72 |
73 |
74 | - Lease Dates.xlsx 8.36 KB
75 | - Timesheet.xlsx 9.92 KB
76 |
77 |
78 |
PDF-Guides 42.61 MB (42 files, 8 folders)
79 |
80 |
81 | - EssentialVBATerms.pdf 2.93 MB
82 | - ExternalLinkErrors.pdf 1.66 MB
83 | - M#ReferenceGuide.pdf 1013.67 KB
84 | - Pasting-Data-Types.pdf 1006.03 KB
85 | - PowerBICheatSheet.pdf 1.02 MB
86 | - VBA-21Questions.pdf 1.71 MB
87 | - VBA-Cells&Ranges.pdf 581.38 KB
88 | - VBA-CheatSheet.docx 439.64 KB
89 | - VBA-CompleteGuide.pdf 610.91 KB
90 | - VBA-DeleteSheet.html 82.15 KB
91 | - VBA-ErrorHandling.pdf 709.51 KB
92 | - VBA-Intro.pdf 800.85 KB
93 | - VBA-ObjectModel.pdf 564.20 KB
94 | - VBA-Pivots.pdf 600.93 KB
95 | - VBA-PivotTableGuide.pdf 1.08 MB
96 | - VBA-PivotTables.pdf 941.80 KB
97 | - VBA-R1C1Notation.pdf 2.26 MB
98 | - VBA-Tutorial1.pdf 831.28 KB
99 | - VBA-Variables.pdf 2.20 MB
100 | - VBA-Workbook.pdf 599.46 KB
101 | - VBA-Worksheet.pdf 597.90 KB
102 |
103 |
MagicTricksForDataWizards-V2 20.60 MB (21 files, 7 folders)
104 |
105 |
106 | - Magic-Tricks-for-Data-Wizards.pdf 6.86 MB
107 | - Magic-Tricks-for-Data-Wizardsv201802.pdf 9.16 MB
108 |
109 |
Chapter1-MergeTables 972.18 KB (2 files)
110 |
111 |
112 | - MergeTables-Finished.xlsx 508.75 KB
113 | - MergeTables-Start.xlsx 463.43 KB
114 |
115 |
116 |
Chapter2-Grouping 466.66 KB (2 files)
117 |
118 |
119 | - Grouping-Finished.xlsx 242.03 KB
120 | - Grouping-Start.xlsx 224.64 KB
121 |
122 |
123 |
Chapter3-CombiningFilesfromFolder 787.65 KB (9 files, 1 folder)
124 |
125 |
126 | - Chapter3-CombiningFilesfromFolder.xlsx 367.12 KB
127 | - FilesFromFolder.pbix 179.15 KB
128 |
129 |
SalesReports 241.38 KB (7 files)
130 |
131 |
132 | - 01-January.xlsx 34.07 KB
133 | - 01-January-Copy.xlsx 34.07 KB
134 | - 02-February.xlsx 33.87 KB
135 | - 03-March.xlsx 33.24 KB
136 | - 04-April.xlsx 31.63 KB
137 | - 05-May.xlsx 32.82 KB
138 | - 06-June.xlsx 41.67 KB
139 |
140 |
141 |
142 |
Chapter4-DynamicCalendarTable 817.92 KB (2 files)
143 |
144 |
145 | - DynamicCalendarTable-Finished.pbix 736.74 KB
146 | - DynamicCalendarTable-Finished.xlsx 81.18 KB
147 |
148 |
149 |
Chapter5-TimeIntelligence 1.14 MB (2 files)
150 |
151 |
152 | - TimeIntelligence-Finished.xlsx 530.59 KB
153 | - TimeIntelligence-Start.xlsx 634.54 KB
154 |
155 |
156 |
Chapter6-WorkingwithSegments 476.93 KB (2 files)
157 |
158 |
159 | - CreatingSegments-Finished.xlsx 248.81 KB
160 | - CreatingSegments-Start.xlsx 228.12 KB
161 |
162 |
163 |
164 |
165 |
PowerQuery 1.30 MB (14 files, 2 folders)
166 |
167 |
168 | - README.md 145 B
169 |
170 |
Queries 28.73 KB (8 files)
171 |
172 |
173 | - CareerOneStop.pq 3.30 KB
174 | - DateTable.pq 892 B
175 | - iexQuery.pq 18.28 KB
176 | - ImportPDF.pq 165 B
177 | - Index.pq 1.05 KB
178 | - IndexCreator.pq 2.13 KB
179 | - ParamTables.pq 770 B
180 | - Swapi.pq 2.18 KB
181 |
182 |
183 |
QueryWorkbooks 1.28 MB (5 files)
184 |
185 |
186 | - GithubEventsQuery.xlsx 329.48 KB
187 | - index.xlsx 144.80 KB
188 | - ParameterTables.xlsx 108.16 KB
189 | - SAC-1.0.0.xlsx 467.75 KB
190 | - SwapiAPI.xlsx 255.42 KB
191 |
192 |
193 |
194 |
ScriptLab 107.61 KB (3 files)
195 |
196 |
197 | - BasicApiCall.js 665 B
198 | - GitHubStars.js 700 B
199 | - ImportJsonData.js 106.28 KB
200 |
201 |
202 |
Shortcuts&Formulas 1.93 MB (6 files)
203 |
204 |
205 | - Buyer-Shortcuts.pdf 120.31 KB
206 | - Excel-Formulas.pdf 684.64 KB
207 | - Excel-Functions.xlsx 173.33 KB
208 | - Excel-Shortcuts.xlsx 23.67 KB
209 | - OneNote-Shortcuts.pdf 625.56 KB
210 | - Windows-7-Keyboard-Shortcuts.pdf 350.12 KB
211 |
212 |
213 |
Templates 25.06 KB (2 files)
214 |
215 |
216 | - Excel Customizations.exportedUI 3.84 KB
217 | - PERSONAL.xlsb 21.22 KB
218 |
219 |
220 |
VBA 3.54 MB (52 files, 10 folders)
221 |
222 |
223 | - VBA-Functions.xlsx 68.28 KB
224 |
225 |
MacroWorkbooks 3.41 MB (32 files, 8 folders)
226 |
227 |
228 | - ExcelLocationMacro.xlsm 20.65 KB
229 | - GetWbFileInfo.xlsm 15.22 KB
230 | - HyperlinkFileList.xlsm 131.18 KB
231 | - JobURLMacro.xlsm 23.98 KB
232 | - MacroWorkbook.xlsm 13.53 KB
233 | - OneNote-Markdown-Compiler.xlsm 35.10 KB
234 | - PTableTemplate.xltx 10.30 KB
235 | - Todays Market Recap.xlsm 265.25 KB
236 |
237 |
Lynda-Learning-Excel2016_MacrosInDepth 2.91 MB (24 files, 7 folders)
238 |
239 |
240 |
Chapter01 392.04 KB (4 files)
241 |
242 |
243 | - Introduction.xlsm 113.29 KB
244 | - Introduction-after recording.xlsm 110.18 KB
245 | - Large Macro ExampIe.xlsm 148.90 KB
246 | - Profits.xlsx 19.67 KB
247 |
248 |
249 |
Chapter02 238.58 KB (3 files)
250 |
251 |
252 | - Phone List.xlsm 27.46 KB
253 | - Playback_Button.xlsm 103.82 KB
254 | - Playback_Ribbon.xlsm 107.30 KB
255 |
256 |
257 |
Chapter03 205.41 KB (2 files)
258 |
259 |
260 | - UsefulMacros.xlsm 101.43 KB
261 | - WorkbookWithMacros.xlsm 103.99 KB
262 |
263 |
264 |
Chapter04 211.68 KB (2 files)
265 |
266 |
267 | - AddCode.xlsm 106.43 KB
268 | - WatchCode.xlsm 105.24 KB
269 |
270 |
271 |
Chapter05 558.56 KB (4 files)
272 |
273 |
274 | - DoLoops.xlsm 151.54 KB
275 | - Interactive.xlsm 184.23 KB
276 | - MailingLists.xlsx 111.81 KB
277 | - MailingLists-2.xlsx 110.99 KB
278 |
279 |
280 |
Chapter06 1.24 MB (8 files)
281 |
282 |
283 | - Final.xlsm 198.91 KB
284 | - Partial.xlsx 144.48 KB
285 | - Partial-2.xlsm 147.97 KB
286 | - Partial-3.xlsm 148.01 KB
287 | - Partial-4.xlsm 156.26 KB
288 | - Partial-5.xlsm 113.25 KB
289 | - Partial-6.xlsm 113.49 KB
290 | - Scoping.xlsx 248.43 KB
291 |
292 |
293 |
Chapter07 103.25 KB (1 file)
294 |
295 |
296 | - UsefulMacros.xlsm 103.25 KB
297 |
298 |
299 |
300 |
301 |
scripts 65.09 KB (19 files)
302 |
303 |
304 | - AsynchronousDownloads.vb 5.44 KB
305 | - ColumnToTabLoop.vb 2.08 KB
306 | - DirectoryList.vb 5.22 KB
307 | - Functions.vb 3.57 KB
308 | - HideOnClose.vb 627 B
309 | - InfoTbl.vb 1.25 KB
310 | - JobCleanxls.vb 8.10 KB
311 | - JobURLCreator.vb 2.48 KB
312 | - LoopThroughFileFolder.vb 1.91 KB
313 | - OnTimeRefreshTable.vb 742 B
314 | - OpenDownloadsFolder.vb 911 B
315 | - personal.vb 2.38 KB
316 | - PrintAdvancedEditor.vb 1.26 KB
317 | - PTable.vb 1.37 KB
318 | - QuickFormat.vb 478 B
319 | - Shortcuts.vb 2.27 KB
320 | - VBA.vb 17.05 KB
321 | - VBACode.vb 7.40 KB
322 | - WkBkInfoTable.vb 622 B
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
--------------------------------------------------------------------------------
/docs/misc/Lease Dates.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/misc/Lease Dates.xlsx
--------------------------------------------------------------------------------
/docs/misc/MOTH-FilterUniqueTutorial.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/misc/MOTH-FilterUniqueTutorial.xlsx
--------------------------------------------------------------------------------
/docs/misc/Timesheet.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prp1277/Excel/7901f5a3dfe3a1d8f0973681f882692d16f41343/docs/misc/Timesheet.xlsx
--------------------------------------------------------------------------------
/microsoftColors.css:
--------------------------------------------------------------------------------
1 | :root {
2 | access: #AF2031;
3 | bookings: #00A99D;
4 | delve: #0078D4;
5 | excel: #107C41;
6 | exchange: #0078D4;
7 | flow: #0066FF;
8 | forms: #038387;
9 | groupMe: #00BCF2;
10 | infoPath: #673686;
11 | }
12 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:base"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------