Checking range of cells for entry then checking for total

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a range of cells named "Reuse_Estimate" (B22:B24 in my worksheet) that
need to have something entered in all cells. Once a value is entered in all
cells, I need to check that the range named "Reuse_Total" is a specific
value. I have the code for the latter, but am not sure how to check that the
Reuse_Estimate ranges are not blank. Any suggestions?

Thanks
 
Hi Barb

You can use the counta function

Sub test()
If Application.WorksheetFunction.CountA(Range("Reuse_Estimate")) = 3 Then
'Do nothing
Else
MsgBox "Please fill in all cells"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top