Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to make IF logical expression equal to any 5 digit value

I wanted to see if there is any way to make the logical expression of an
IF statement equal to any 5 digit value.

Ex: =IF(B2=?????, ....

If the value in B2 is a 5 digit value then it is true and false if it
is not.

-yalex


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to make IF logical expression equal to any 5 digit value

Try something like the following formula:

=IF(AND(ISNUMBER(B2),LEN(B2)=5),"yes","no")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"yalex " wrote in message
...
I wanted to see if there is any way to make the logical

expression of an
IF statement equal to any 5 digit value.

Ex: =IF(B2=?????, ....

If the value in B2 is a 5 digit value then it is true and false

if it
is not.

-yalex


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to make IF logical expression equal to any 5 digit value

Thanks a lot. Worked perfectly

--
Message posted from http://www.ExcelForum.com

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
Using cell reference with logical operator in DGET expression BoxleyFarm Excel Worksheet Functions 1 April 28th 10 11:31 AM
logical expression help please KRK New Users to Excel 7 March 19th 09 05:02 PM
Can I use more complex logical expression for sumif as creteria? xwenx Excel Worksheet Functions 7 April 28th 06 12:53 AM
How do you determine if a field is blank in a logical expression. Van Excel Discussion (Misc queries) 2 December 5th 05 10:08 PM
variable not equal to expression steve Excel Programming 2 August 11th 03 07:05 PM


All times are GMT +1. The time now is 08:12 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"