Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies
1 part done in excel
2 part
1) done in excel sheet
2)=dsum(database,field,criteria)
2)=daverage(database,field,criteria)
3)=dcount(database,field,criteria)
since my excel is getting hange because of a large DATA i am writing down syntax for 2 and 3 queston for 2 part
third part
1) done in excel
2) VBA Code to convert selected data into pdf
Sub ExportSelectedDataToPDF()
Dim DataRange As Range
Dim PDFPath As String
Dim PDFFileName As String
Set DataRange = Selection
PDFPath = "C:\Your\PDF\Path\"
PDFFileName = "Applicant_Data.pdf"
If Dir(PDFPath, vbDirectory) = "" Then
MkDir PDFPath
End If
DataRange.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=PDFPath & PDFFileName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
MsgBox "PDF created successfully at " & PDFPath & PDFFileName, vbInformation
End Sub
3) VBA Code to Check Spelling mistakes
Sub CheckSpellingInWorkbook()
Dim ws As Worksheet
Dim rng As Range
For Each ws In ThisWorkbook.Sheets
Set rng = ws.UsedRange
rng.CheckSpelling
rng.ClearComments
Next ws
MsgBox "Spelling check complete for the entire workbook.", vbInformation
End Sub
drive link
https://drive.google.com/drive/folders/1B-bAeppU8T-qOathO8x1ipJCNrLTMtf4