• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Check multiple cells and give message if multiple are selected

Kumarkusa

New Member
Hi,

We have a sheet where users can select Yes/No drop downs in 5 cells.....They are able to select multiple cells.....BUt it should be ONLY 1 Yes selection...If they select multiple cells as Yes...and try to submit data.. then the data submission should be stopped.

We need to check the cells..and if multiple cells are selected as 'Yes'..then we need to show a message ..and stop data submission...

All these cells have named ranges..how can we put this in Code.

Thanks
 
Hi ,

You can use a helper cell where you have a formula such as :

=COUNTIF(datarange , "Yes")

Your existing code which runs when the SUBMIT button is pressed , can check to see if this is more than 1 , and if so display a message alerting the user , and exit the routine which does the data submission.

If you can post the existing code , or even better upload your complete workbook , the necessary changes can be implemented within your workbook.

Narayan
 
Back
Top