Advertisement
Pastebinuser1993

Blankcell

Jun 17th, 2023
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub CommandButton1_Click()
  2.  
  3. Click
  4.  
  5. Dim mycell As Range Dim myrange As Range
  6.  
  7. Set myrange Worksheets("Blank Cells").Range("C3:H11")
  8.  
  9. For Each mycell In myrange
  10.  
  11. If mycell.Value =
  12.  
  13. Then
  14.  
  15. mycell.Interior.ColorIndex = 4 mycell.Value="Blank Cell" End If
  16.  
  17. Next mycell
  18.  
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement