ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find if nth char = specific character.. (https://www.excelbanter.com/excel-discussion-misc-queries/57123-find-if-nth-char-%3D-specific-character.html)

nastech

Find if nth char = specific character..
 
hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.

Andy Pope

Find if nth char = specific character..
 
Hi,

Try the MID function.

=MID(A1,5,1)="A"

Cheers
Andy

nastech wrote:
hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Bob Phillips

Find if nth char = specific character..
 
=IF(MID(A1,5,1)="A","yes","no")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"nastech" wrote in message
...
hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.




Ron Coderre

Find if nth char = specific character..
 
Try working with this:

If the text to test is in Cell A1:
B1:=IF(MID(A1,5,1)="A","Yes","No")

Does that point you in the right direction?

***********
Regards,
Ron


"nastech" wrote:

hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.


nastech

Find if nth char = specific character..
 
that's great, thanks..

"Bob Phillips" wrote:

=IF(MID(A1,5,1)="A","yes","no")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"nastech" wrote in message
...
hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.





nastech

Find if nth char = specific character..
 
that's great, thanks..

"Ron Coderre" wrote:

Try working with this:

If the text to test is in Cell A1:
B1:=IF(MID(A1,5,1)="A","Yes","No")

Does that point you in the right direction?

***********
Regards,
Ron


"nastech" wrote:

hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.


nastech

Find if nth char = specific character..
 
that's great, thanks..

"Andy Pope" wrote:

Hi,

Try the MID function.

=MID(A1,5,1)="A"

Cheers
Andy

nastech wrote:
hi, trying to find way to see if 5th character equals the letter A.
know / tried: len( or right( but item tested may have more than 5
characters. Thanks.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info



All times are GMT +1. The time now is 04:46 AM.

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