If the third letter is equal

I have a cell that contains any 4 letters, for example akei, skiw. How can i ask

"if the third letter is i, then it is True"

I thought something like

"= if (a1 ="? i? ", True, False)"

But what dosen't Work

+5
source share
4 answers
=MID(A1,3,1) = "i"

If you work, you do not need to use IF, an evaluation using equals will return either TRUEorFALSE

+7
source

The MID function allows you to select a part of the text if you set the start position and the number of characters you want

=MID(A1,3,1) = "i"

so you just compare it to "i"

+3
source

, COUNTIF

=COUNTIF(A1,"??i?")

1 0 : A1 4 , - "i"

As with MID, this is not case sensitive, so 1 will be returned for both XXIX and zziz

+2
source

So, I applied this question for a similar use: Extension of the numbering system for a laboratory sample with each digit distinguishing something else and a 3rd digit denoting a heating profile

The resulting function was used to extend these codes to people who otherwise would not know my logic:

=IF(MID(B2,3,1) = "1", "Temp1°C for 1 hour", "Temp2°C for X hours")
0
source

All Articles