You could use
If Application.CountA(Range("A2:H2,B3:I4,B6:V7,B9:V9,B11:V11,B13:V13,B15:V15")) = 0 Then
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have a spreadsheet similar to what is shown below, and I need to use VBA to ensure that none of the data entry cells (blue cells on form) are empty when I go to print the form. I know I can check each cell using If Range(Cell)="" and Range(Cell2)=""... but I would like to know if there is a better way: Maybe check the whole group of cells by naming the entire group of blue cells; Checking entire ranges; Looping through all cell options; Or any another better option.
Thanks, SP
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
You could use
If Application.CountA(Range("A2:H2,B3:I4,B6:V7,B9:V9,B11:V11,B13:V13,B15:V15")) = 0 Then
You have two different shades of blue. Which group are you referring to or do you want to check both groups.
Sorry for the confusion. Just the empty light blue cells. Thanks!
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Does any of those cells contain a formula that returns "", so that it looks empty?