Challenge

Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies

Project 2

Akshay Bandewar

Features of Dashboard

* Gender Ratio of Applicants

Car Owner/ Non-Owner Ratio

House Owner/ Non-Owner Ratio

Client Income Type

Client’s Level of Education

Client’s Housing Type

Client’s Family Status

Client’s Occupation Type

Data Summary of All Female Client’s for Income and Loan Amount using New Functions

Data Summary of All Male Client’s for Income and Loan Amount using List Functions

Create a Macro for Data Formatting (Conditional Formatting, Freezing Panes) of workbook as same will be applied to the data of next quarter

ans:


Sub Macro1()
'
' Macro1 Macro
' Conditional Formatting
'
' Keyboard Shortcut: Ctrl+a
'
Cells.Select
Selection.FormatConditions.AddColorScale ColorScaleType:=3
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _
xlConditionValueLowestValue
With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor
.Color = 7039480
.TintAndShade = 0
End With
Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _
xlConditionValuePercentile
Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50
With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor
.Color = 8711167
.TintAndShade = 0
End With
Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _
xlConditionValueHighestValue
With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor
.Color = 8109667
.TintAndShade = 0
End With
Rows("1:1").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Rows("1:1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("E3").Select
End Sub


Q. Create VBA Code to convert selected data into pdf from applicant data

ans:

Sub PrintSelectionToPDF()

Dim ThisRng As Range
Dim strfile As String
Dim myfile As Variant

If Selection.Count = 1 Then
Set ThisRng = Application.InputBox("Select a range", "Get Range", Type:=8)
Else
Set ThisRng = Selection
End If
strfile = "Selection" & "_" _
& Format(Now(), "yyyymmdd_hhmmss") _
& ".pdf"
strfile = ThisWorkbook.Path & "\" & strfile

myfile = Application.GetSaveAsFilename _
(InitialFileName:=strfile, _
FileFilter:="PDF Files (*.pdf), *.pdf", _
Title:="Select Folder and File Name to Save as PDF")

If myfile <> "False" Then
ThisRng.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
myfile, 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

Q. Check Spelling mistakes in the workbook using VBA Code

ans:

Public Sub SpellCheck()
Dim Rng As Range
For Each Rng In ActiveSheet.UsedRange
If Not Application.CheckSpelling(Rng.Text) Then
Rng.Interior.Color = RGB(255, 0, 0)
End If
Next Rng
End Sub

Project 2 Link Attached Here

https://docs.google.com/spreadsheets/d/1apK9cLOypx1xyprG8k3KjtDVDfGwLdtj/edit?usp=share_link&ouid=110116081645783645740&rtpof=true&sd=true

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.