Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies
https://drive.google.com/file/d/1HirkdcahBvGV35XknbPbfwbIod6JTlYN/view?usp=share_link
- Create a Macro for Data Formatting (Conditional Formatting, Freezing Panes) of workbook as same will be applied to the data of next quarter
Sub Conditional_Formatting_sheet()
'
' Conditional_Formatting_sheet Macro
' This will prived the bars in the numerical fields
'
' Keyboard Shortcut: Ctrl+q
'
Cells.Select
Selection.FormatConditions.
Selection.FormatConditions(
Selection.FormatConditions(
With Selection.FormatConditions(1)
.MinPoint.Modify newtype:=
.MaxPoint.Modify newtype:=
End With
With Selection.FormatConditions(1).
.Color = 8700771
.TintAndShade = 0
End With
Selection.FormatConditions(1).
Selection.FormatConditions(1).
Selection.FormatConditions(1).
Selection.FormatConditions(1).
Selection.FormatConditions(1).
xlDataBarColor
With Selection.FormatConditions(1).
.Color = 8700771
.TintAndShade = 0
End With
Selection.FormatConditions(1).
With Selection.FormatConditions(1).
.Color = 0
.TintAndShade = 0
End With
With Selection.FormatConditions(1).
.Color = 255
.TintAndShade = 0
End With
With Selection.FormatConditions(1).
.Color = 255
.TintAndShade = 0
End With
ActiveWindow.SmallScroll Down:=-21
Selection.FormatConditions.
Selection.FormatConditions(
Selection.FormatConditions(1).
xlConditionValueLowestValue
With Selection.FormatConditions(1).
.Color = 8109667
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValuePercentile
Selection.FormatConditions(1).
With Selection.FormatConditions(1).
.Color = 8711167
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueHighestValue
With Selection.FormatConditions(1).
.Color = 7039480
.TintAndShade = 0
End With
Selection.FormatConditions.
Selection.FormatConditions(
Selection.FormatConditions(1).
xlConditionValueLowestValue
With Selection.FormatConditions(1).
.Color = 8109667
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueHighestValue
With Selection.FormatConditions(1).
.Color = 10285055
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueLowestValue
With Selection.FormatConditions(1).
.Color = 16776444
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueHighestValue
With Selection.FormatConditions(1).
.Color = 7039480
.TintAndShade = 0
End With
ActiveWindow.SmallScroll Down:=-6
Selection.FormatConditions(1).
xlConditionValueLowestValue
With Selection.FormatConditions(1).
.Color = 7039480
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValuePercentile
Selection.FormatConditions(1).
With Selection.FormatConditions(1).
.Color = 8711167
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueHighestValue
With Selection.FormatConditions(1).
.Color = 8109667
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueLowestValue
With Selection.FormatConditions(1).
.Color = 7039480
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValuePercentile
Selection.FormatConditions(1).
With Selection.FormatConditions(1).
.Color = 16776444
.TintAndShade = 0
End With
Selection.FormatConditions(1).
xlConditionValueHighestValue
With Selection.FormatConditions(1).
.Color = 8109667
.TintAndShade = 0
End With
Range("H16").Select
ActiveWindow.SmallScroll Down:=-24
Rows("1:1").Select
Selection.Font.Bold = True
End Sub
Sub Freeze_pane()
'
' Freeze_pane Macro
' It will freeze pane
'
' Keyboard Shortcut: Ctrl+e
'
Rows("1:1").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
ActiveWindow.SmallScroll Down:=-24
End Sub
- Create VBA Code to convert selected data into pdf from applicant data
Public Sub data_into_pdf()
Dim rng As Range
Dim xtfile As String
Dim file1 As Variant
If Selection.Count = 1 Then
Set rng = Application.InputBox("Select a range", "Get Range", Type:=8)
End If
'Prompt for save location
xtfile = "Selection" & "_" _
& Format(Now(), "yyyymmdd_hhmmss") _
& ".pdf"
xtfile = ThisWorkbook.Path & "\" & xtfile
file1 = Application.GetSaveAsFilename _
(InitialFileName:=xtfile, _
FileFilter:="PDF Files (*.pdf), *.pdf", _
Title:="Select Folder and File Name to Save as PDF")
If file1 <> "False" Then 'save as PDF
rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
file1, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
Else
MsgBox "No File Selected. PDF will not be saved", vbOKOnly, "No File Selected"
End If
End Sub
- Data Summary for all Flag Columns like (FLAG_DOCUMENT_2, FLAG_DOCUMENT_3 etc.) using all variants of DCOUNT function.
Private Sub Highlight_Misspelled_Words()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not Application.CheckSpelling(
Next
End Sub