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/drive/folders/1dugwXM-8u7_SjgW6A4G-Y36cnvN6drEP?usp=sharing
Public Sub DataFormatting()
Dim MyRange As Range
Set MyRange = Range("A1:DR307512")
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=x1Between, _
Formula1:="100", Formula2:="150"
MyRange.FormatConditions(1).Interior.Color = RGB(156, 0, 0)
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formulal:="100"
MyRange.FormatConditions(2).Interior.Color = vbGreen
MyRange.FormatConditions.Add Type:=x1Cellvalue, Operator:=x1Greater, _
Formulal:="150"
MyRange.FormatConditions(3).Interior.Color = vbViolet
MyRange.FormatConditions.Add Type:=x1Cellvalue, Operator:=x1Less, _
Formulal:="100"
MyRange.FormatConditions(2).Inter.Color = Vbrange
End Sub
Public Sub SavetoPDF()
Dim ThiSRng As Range
Dim strfile As String
Dim myfile As Variant
If Selection.Count = 1 Then
Set ThiSRng = Application.InputBox("select & 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:=x1TypePDF, Filename:= _
myfile, Quality:=x1Qualitystandard, IncludeDoCProperties:=True, _
IgnorePrintAreas:=False, openAfterPublish:=True
Else
MsgBox "No Fille selected.PDF will not be saved", vbOKOnly, "No File selected"
End If
End Sub
Public Sub SpellingCheck()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not Application.CheckSpelling(word:=cell.Text) Then
cell.Style = "Bad"
End If
Next cell
End Sub