View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default return value based on number of characters in cell / field

How about exactly 2 chars?

=MAX(IF(LEN(A1)=2,2),1) returns 1 if <2 otherwise returns 2


Gord Dibben MS Excel MVP

On Wed, 10 Dec 2008 11:47:00 -0800, Perplexed
wrote:

I have a field with varying number of characters, I need function that
returns a value based on the number of characters in field.

ie if field x <2 characters = 1 2 characters = 2

Thanks