Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
TWO QUESTIONS: Validation & Spacing...PLEASE HELP Polina Excel Discussion (Misc queries) 3 July 29th 05 02:36 AM
Named range questions Tetsuya Oguma[_3_] Excel Programming 4 May 31st 04 12:59 AM
Named range questions Tetsuya Oguma[_3_] Excel Programming 0 May 31st 04 12:16 AM
Data Validation Questions Fred Lambelet[_2_] Excel Programming 0 February 2nd 04 01:13 AM


All times are GMT +1. The time now is 07:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"