Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Validation of partial data in a cell.

I would like to know how I can perform an IF statement on a cell when looking
at just the first few characters in that cell. Any suggestions?

i.e. Cell A1 = "Test"

If(A1={first two characters},1,0)

Thanks in advance, Chris.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Validation of partial data in a cell.

You mean like this?

=If(MID(A1,1,2)="Te",1,0)

Chris wrote:

I would like to know how I can perform an IF statement on a cell when looking
at just the first few characters in that cell. Any suggestions?

i.e. Cell A1 = "Test"

If(A1={first two characters},1,0)

Thanks in advance, Chris.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Validation of partial data in a cell.

=if(left(a1,2)="te",1,0)
or if you're looking to return 0 or 1:
=--(left(a1,2)="te")
the -- stuff changes the true/false to 1/0.



Chris wrote:

I would like to know how I can perform an IF statement on a cell when looking
at just the first few characters in that cell. Any suggestions?

i.e. Cell A1 = "Test"

If(A1={first two characters},1,0)

Thanks in advance, Chris.


--

Dave Peterson
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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
Formula for Pulling partial data from one cell into another Jamie Excel Worksheet Functions 5 June 1st 07 12:35 AM
Why does data validation not work when pasting data into a cell. rjshelby Excel Discussion (Misc queries) 1 July 31st 06 09:08 PM
remove partial data from cell nanox Excel Worksheet Functions 2 April 4th 06 02:33 AM
Bringing partial data from one cell into another Jack Taylor Excel Worksheet Functions 2 April 5th 05 06:43 PM


All times are GMT +1. The time now is 02:30 AM.

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"