Challenge

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

ub CheckSpellingMistakes()

Dim ws As Worksheet

Dim cell As Range

Dim rng As Range

Dim hasSpellingError As Boolean

' Loop through each worksheet in the workbook

For Each ws In ThisWorkbook.Worksheets

' Set the range to the used range of the worksheet

Set rng = ws.UsedRange

' Turn off screen updating to improve performance

Application.ScreenUpdating = False

' Loop through each cell in the used range

For Each cell In rng

' Check if the cell is not empty and is text

If Not IsEmpty(cell.Value) And IsText(cell.Value) Then

' Check if the cell's spelling is correct

If Not Application.CheckSpelling(cell.Value) Then

' Highlight the cell with a spelling mistake

cell.Interior.Color = RGB(255, 200, 200) ' Light red color

hasSpellingError = True

End If

End If

Next cell

' Restore screen updating

Application.ScreenUpdating = True

Next ws

' Provide feedback to the user

If hasSpellingError Then

MsgBox "Spelling check complete. Cells with spelling mistakes have been highlighted.", vbInformation

Else

MsgBox "No spelling mistakes found in the workbook.", vbInformation

End If

End Sub

https://docs.google.com/spreadsheets/d/1uPegjjTbw1TkD0rsVVEx_4HlXDRDfwjU/edit?usp=sharing&ouid=102512358167897733935&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.