Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50079

Check all data entered in table before executing code

$
0
0
On the attached example, I have a table of data in the range of B4:R303.

What I want to do is add some code before some existing code I have in a command button on the worksheet to check all data has been entered before running the existing code. If the code finds a row with missing data then a message box appears telling the user.

For example, on the attached file I have data missing in cells H7 and J9, K9 & P9. So, in this instance I would want the message box to appear after clicking the command button and say:

The Data table is missing:
Wigan v West Ham: Header 8
Tottenham v Sunderland: Header 10, Header 11, Header 16

and when the user presses an 'OK' button on the message box the first cell of missing data (H7) is activated.
Attached Files

Viewing all articles
Browse latest Browse all 50079

Trending Articles