VBA code

  • Thread starter Thread starter W. Adam Glab
  • Start date Start date
W

W. Adam Glab

I have a cell that data put into it needs to be validated, with upper and
lower limits. Need to write click event which will control data input within
the limits, for example:
Input box can only accept between 15 and 75, any idea how to write the code.
Do while numbers ...........................


Loop

Thanks for your help.
 
Rather than using code, you can use Data Validation to do this.
Select the cell in question, then go to the Data menu and choose
Validation. In the Allow drop down, choose "Decimal" and in the
Data drop down, choose "between". Enter 15 and 75 as the minimum
and maximum values.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Why not try data validation.
select the cell(s) you want>data>validation>allow custom>type in
=and(a2>15,a2<75)
 

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

Back
Top