Challenge

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

VBA IS NOT WORKING ON THE LARGE DATA SETS MY SYSTEM GOT CORRUPTED AND BIOS ALSO ALSO CORRUPTED SO I GOT THE CODE FROM CONDITIONAL FORMATTING AND FREEZE PANES THROUGH MY EXCEL VBA,BUT UNABLE TO LOAD THE DATA .

PLEASE UNDERSTAND MY PROBLEM BELOW I AM PROVIDING MY FOUR CODES OF CONDITIONAL FORMATTING,FREEZING PANES OF MACROS

1.https://drive.google.com/file/d/1zi2stiX7EC-pHNyrWvVkvf7ecCeGO4jk/view?usp=share_link

2.https://docs.google.com/spreadsheets/d/13cb6rZjQO6xCAxwmWXRSEfFDSJKYvAxo/edit?usp=share_link&ouid=110310917528553450049&rtpof=true&sd=true

MACROS AND VBA CODE-----------

Conditional formatting---

Public Sub Formatting()
Dim MyRange As Range
Set MyRange = Range("A1:DR307512")
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula:="100", Formula2:="150"
MyRange.FormatConditions(1).Interior.Color = vRGB(156, 0, 0)
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula:="100"
MyRange.FormatConditions(2).Interior.Color = vbGreen
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula:="150"
MyRange.FormatConditions(3).Interior.Color = vbViolet
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula:="100"

MyRange.FormatConditions(2).Interior.Color = vbOrange

ActiveWorkSheet.FullName
End Sub


------------------

Freezing Panes

Public Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "MainData" Or Sh.Name = "Sheet2" Then
Range("A1:DR").Select
With ActiveWindow
.FreezePanes = False
.FreezePanes = True
End With
End If
End Sub

-----------------------------------------
Selected data TO PDF CONVERSION----


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 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
-------------------------------------
Checking Spelling Mistakes..

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

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.