Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pmms
 
Posts: n/a
Default determine if ea value in a col has more than 20 chars

I know I have to use LEN in a loop but I don't know VBA and need this info
asap. can you help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default determine if ea value in a col has more than 20 chars

for each c in range("a2:a22")
if len(c)20 then msgbox "Bingo"
next c

--
Don Guillett
SalesAid Software

"pmms" wrote in message
...
I know I have to use LEN in a loop but I don't know VBA and need this info
asap. can you help?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default determine if ea value in a col has more than 20 chars

Try something like this:

For a list of text values, or blanks, in A10: A20

A1: =SUMPRODUCT(--(LEN(A10:A20)20))=ROWS(A10:A20)

That formula returns TRUE if all of the referenced cells contain values and
the length of those values is greater than 20 characters. It returns FALSE
if any of the cells is blank or has a length of 20 characters or less.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"pmms" wrote:

I know I have to use LEN in a loop but I don't know VBA and need this info
asap. can you help?

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
How to determine total value of business for sale Margie Campbell Excel Worksheet Functions 0 February 19th 06 08:31 PM
In the worksheet_change event, how do I determine what occured? Tim Patton Excel Worksheet Functions 6 November 3rd 05 08:38 PM
How to determine second (and then third) highest value in a list Scott M. Lyon Excel Discussion (Misc queries) 4 September 12th 05 08:51 PM
Code to determine if a cell contains an array function? [email protected] Excel Discussion (Misc queries) 1 August 29th 05 10:35 PM
formula to determine the first column containing any data sd Excel Worksheet Functions 5 November 9th 04 08:06 PM


All times are GMT +1. The time now is 06:55 PM.

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"