ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Validation (https://www.excelbanter.com/excel-programming/384384-data-validation.html)

JT

Data Validation
 
I want to have data validation on 15 cells only. These 15 cells are for
account numbers. I have a list of valid account numbers on a hidden
worksheet.

I've seen some comments on adding validation to a whole column. Can I
progam the workbook, so the validation only applies to 15 cells on a specific
sheet?

Any suggestions or code to get me started would be appreciated. As always,
Thanks for all of the help in this newsgroup.....
--
JT

Tom Ogilvy

Data Validation
 
turn on the macro recorder

Select the 15 cells,
Manually apply the data=Validation.
turn off the macro recorder.

Examine the code
(assumes you have a defined name that refers to the range of acceptable
entries on the other sheet - which is a requirement to use data validation. )

there is no reason to apply data validation to the whole column if you only
want to do it to 15 cells.

--
Regards,
Tom Ogilvy


"JT" wrote:

I want to have data validation on 15 cells only. These 15 cells are for
account numbers. I have a list of valid account numbers on a hidden
worksheet.

I've seen some comments on adding validation to a whole column. Can I
progam the workbook, so the validation only applies to 15 cells on a specific
sheet?

Any suggestions or code to get me started would be appreciated. As always,
Thanks for all of the help in this newsgroup.....
--
JT



All times are GMT +1. The time now is 05:25 PM.

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