ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using IF based on an LEN field (https://www.excelbanter.com/excel-worksheet-functions/113396-using-if-based-len-field.html)

James T

Using IF based on an LEN field
 
Best way to describe to to explain the data I think:

1) Cell A1 = 505
2) Cell A2 = 506
3) Cell A3 = A1 & ", " & A2
4) Cell A4 = if(Len(A3=7),"lower","greater)

The last equation does not seem to work.

I can only assume this is because it is trying to determine the length of
another equation and cannot cope (my assumption here).

Any ideas how I can get this to work for me?

Regards

James


Biff

Using IF based on an LEN field
 
4) Cell A4 = if(Len(A3=7),"lower","greater)
The last equation does not seem to work.


Try it like this:

=IF(LEN(A3)=7,"lower","greater")

Biff

"James T" wrote in message
...
Best way to describe to to explain the data I think:

1) Cell A1 = 505
2) Cell A2 = 506
3) Cell A3 = A1 & ", " & A2
4) Cell A4 = if(Len(A3=7),"lower","greater)

The last equation does not seem to work.

I can only assume this is because it is trying to determine the length of
another equation and cannot cope (my assumption here).

Any ideas how I can get this to work for me?

Regards

James




Tom Ogilvy

Using IF based on an LEN field
 
For your example, the length would be 8 since you have two numbers of length
3 and concatenate in two characters - a comma and a space.


Perhaps you want something like this
= if(Len(A3)=7,"lower","greater")

Biff gave you the correction for =7, but it seems slightly odd that your
example wouldn't pass the test.

Hard to say.

--
Regards,
Tom Ogilvy


"James T" wrote in message
...
Best way to describe to to explain the data I think:

1) Cell A1 = 505
2) Cell A2 = 506
3) Cell A3 = A1 & ", " & A2
4) Cell A4 = if(Len(A3=7),"lower","greater)

The last equation does not seem to work.

I can only assume this is because it is trying to determine the length of
another equation and cannot cope (my assumption here).

Any ideas how I can get this to work for me?

Regards

James





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

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