Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range.Validation Questions
Hi
I have an applicaton that takes a selection of cells which should be a list of numbers. I use the SpecialCells function to ensure that i have a range which consists of only numbers and no text strings. I also want to ensure that all the strings are of a minimum length. I know there is a range validation method and a textLength option that goes with it but im not sure if it will do what i want it to. I cant find much info on how to use it other than the 1 example on MSDN. Anyone got any clues? Thanks BC |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range.Validation Questions
Hi Ben
one option, you could cycle through the range you've selected checking the length in each cell and writing the "non-compliant" cells to a message box e.g. Dim strmsg strmsg = "Non Compliant cells" For Each cell In myrange 'use the range you've already selected If Len(cell.Value) < 10 Then 'or whatever length you're after strmsg = strmsg & "; " & cell.Address End If Next MsgBox strmsg Hope this helps Cheers JulieD "Ben Crinion" wrote in message ... Hi I have an applicaton that takes a selection of cells which should be a list of numbers. I use the SpecialCells function to ensure that i have a range which consists of only numbers and no text strings. I also want to ensure that all the strings are of a minimum length. I know there is a range validation method and a textLength option that goes with it but im not sure if it will do what i want it to. I cant find much info on how to use it other than the 1 example on MSDN. Anyone got any clues? Thanks BC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Validation Data using Validation Table cell range..... | Excel Discussion (Misc queries) | |||
TWO QUESTIONS: Validation & Spacing...PLEASE HELP | Excel Discussion (Misc queries) | |||
Named range questions | Excel Programming | |||
Named range questions | Excel Programming | |||
Data Validation Questions | Excel Programming |