I have a spreadsheet which is used as a template to upload data. The user
pastes in their data and, if the data validates ok, then a "flatfile" is output
for upload to a database.
As such I have data validation rules in place on various cells/columns across
the sheet. I managed this no problem at all. This validation is run by VBA code
from a command button as the data is ALWAYS pasted in, bypassing the normal data
entry validation. Most of the cells contents are items from various named drop
down lists from another tab on the sheet
Once the validation is complete I have written VBA to highlight the cells
that failed validation. This all works fine.
The problem is that now I have been asked to add validation to make
certain "mandatory" fields are completed (i.e. Not empty). My issue is that to
do this I had to uncheck "Ignore blanks" in the validation rules options as some
cells CAN be blank while others are mandatory. This means I need to check the
previous validated cell to make sure it is not empty (to check the end of the
file has not been reached) and then apply the validation to the cell ONLY if the
previous cell was not empty.
I think I need to use the custom option in the validation rules but do not
know how to create a formula which only validates if the previous validated cell
is not null.
Any help or pointers would be greatly appreciated.