Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 138
Default IF OR LEN Formula Question

Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 345
Default IF OR LEN Formula Question

Without knowing the layout of your worksheet it's difficult to give a
definitive formula but try working with this:
=IF(OR(LEN(A1)=7,LEN(A1)=11),"yes","no")

"Paula" wrote:

Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default IF OR LEN Formula Question

let say LON-NYC on cell A1, you may set formula in A2
=IF(LEN(A1),"Yes","No")

"Paula" wrote:

Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default IF OR LEN Formula Question

Paula,

If youe happy with TRUE/False use this

=OR(LEN(A1)=7,LEN(A1)=11)

If it needs to be YES/NO, use this

=IF(OR(LEN(A1)=7,LEN(A1)=11),"Yes","No")

Drag down as required.

Mike

"Paula" wrote:

Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default IF OR LEN Formula Question

=IF(OR(LEN(A1)=7,LEN(A1)=11),"yes","no")


On 6 Maj, 11:51, Paula wrote:
Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default IF OR LEN Formula Question

Another configuration:

=IF(OR(LEN(A1)={7,11}),"Yes","No")
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Paula" wrote in message
...
Hi, Can you help me with a formula, I need to identify all instances where a
cell contains an entry with either 7 or 11 characters. so for example the
following would be recognised as yes, anything not 7 or 11 characters would
be no. Hope you can help.

LON-NYC
LON-NYC-LON

Many thanks
Paula


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
formula question JaneSmith Excel Worksheet Functions 2 June 18th 08 05:22 PM
Another Formula Question zoomzoom632 Excel Discussion (Misc queries) 3 September 17th 07 01:50 AM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
IF formula question impress Excel Worksheet Functions 1 February 14th 06 12:30 AM
Question regarding formula Joe Gieder Excel Worksheet Functions 3 February 6th 06 09:26 PM


All times are GMT +1. The time now is 05:25 PM.

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

About Us

"It's about Microsoft Excel"