Challenge

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

Dashboard -

Link - https://onedrive.live.com/embed?cid=D60D76CF9117A98C&resid=D60D76CF9117A98C%21283&authkey=AFZsH_5l7n95v7g&em=2

The file will be attached named "Applicant Data - Solution"

The Separate Worksheet is also attached, named " ". All three data summary in the same file. Due to data, the file is LARGE.

VBA Macros -

1.

Sub ApplyConditionalFormattingAndFreezePanes()
Dim ws As Worksheet
Dim rng As Range

Set ws = ThisWorkbook.Worksheets("Sheet1")

ws.Cells.FormatConditions.Delete

Set rng = ws.Range("A1:D10")

With rng.FormatConditions.Add(Type:=xlExpression, Formula1:="=$A1>10")
.Interior.Color = RGB(255, 0, 0)
End With

ws.Range("B2").Select
ws.Activate
ActiveWindow.FreezePanes = True
End Sub

2.

Sub ConvertSelectionToPDF()
Dim ws As Worksheet
Dim rng As Range
Dim savePath As String
Dim fileName As String

Set ws = ThisWorkbook.Worksheets("Sheet1")

Set rng = Selection

If rng Is Nothing Then
MsgBox "Please select the data to convert to PDF.", vbExclamation
Exit Sub
End If

With Application.FileDialog(msoFileDialogSaveAs)
.Title = "Save PDF"
.Filter = "PDF files (*.pdf)|*.pdf"

If .Show = -1 Then
savePath = .SelectedItems(1)

If Right(savePath, 4) <> ".pdf" Then
savePath = savePath & ".pdf"
End If

rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=savePath

fileName = Mid(savePath, InStrRev(savePath, "\") + 1)
MsgBox "The selected data has been converted to PDF and saved as '" & fileName & "'.", vbInformation
End If
End With
End Sub

3.

Sub CheckSpelling()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range

Set ws = ThisWorkbook.Worksheets("Sheet1")

Set rng = ws.UsedRange

Application.DisplayAlerts = False


For Each cell In rng
If cell.Value <> "" Then
cell.CheckSpelling
End If
Next cell

Application.DisplayAlerts = True

MsgBox "Spelling check complete.", vbInformation
End Sub

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.