Code Needed for to check data input

A

Albert Mulder

I have

D4-D10
E4-E10
F4-F10
G4-G10
H4-H10
I4-I10
J4-J10

The user will input a number but can only be 0-9. How can I make it so that
they can only enter numbers and only 0-9? I will need to have it for all of
the cells listed above.

Thank you
 
N

Norman Jones

Hi Albert,

Try using Excel's Data V alidation tool

Select all the cells of interest
Menu | Data | Data Validation |
Allow: Whole number
Data: Between
0 | 9

If you need to apply tthe validation from
VBA, turn on the macro recorder to obtain
the required syntax.
 
A

Albert Mulder

That worked thank you.

Norman Jones said:
Hi Albert,

Try using Excel's Data V alidation tool

Select all the cells of interest
Menu | Data | Data Validation |
Allow: Whole number
Data: Between
0 | 9

If you need to apply tthe validation from
VBA, turn on the macro recorder to obtain
the required syntax.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top