# Do not allow blank or null if Adjacent Cell Contains Specific Text in Excel using VBA code



## anbaz (Dec 17, 2022)

I’m working on to build a simple data entry form for my users where I need to validate one scenario

Please see the same data.

*Field Name*​*DataType*​*Dropdown values*​NameText​NADOBDate​NAOffer RelatedList Items​1. Welcome Offer
2. Shopping Offer
3. Weekend Offer
4. OtherCard NumberNumber​NAStatementList Items​1. Email
2. Physical Copy
3. SMS

If user selects Datatype = List Items then the user cannot leave the “dropdown values” cell with null value, I want to validate and prompt user using MsgBox alert. I want to achieve this validation using VBA code as I have other validation for the same cell range using data validation.

Can someone help?


----------

