ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code Needed for to check data input (https://www.excelbanter.com/excel-programming/411192-code-needed-check-data-input.html)

Albert Mulder

Code Needed for to check data input
 
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

Norman Jones[_2_]

Code Needed for to check data input
 
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.




---
Regards.
Norman


"Albert Mulder" wrote in message
...
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



Albert Mulder

Code Needed for to check data input
 
That worked thank you.

"Norman Jones" wrote:

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.




---
Regards.
Norman


"Albert Mulder" wrote in message
...
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




All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com