ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function (https://www.excelbanter.com/excel-worksheet-functions/173470-if-function.html)

BAS

IF function
 
Is it possible to perform an IF function on a certain character? For example:

In this model string, 0068T21N00A025T32E5X8Q4C4, I would like to perform an
IF function on the 11th character. If the 11th character = N, I would like
the true value = 0 and the false value = 1.

THanks,
B


Pete_UK

IF function
 
Try this, with your data in A1:

=IF(MID(A1,11,1)="N",0,1)

Hope this helps.

Pete

On Jan 17, 4:32*pm, BAS wrote:
Is it possible to perform an IF function on a certain character? For example:

In this model string, 0068T21N00A025T32E5X8Q4C4, I would like to perform an
IF function on the 11th character. If the 11th character = N, I would like
the true value = 0 and the false value = 1.

THanks,
B



Teethless mama

IF function
 
=--(NOT(MID(A1,11,1)="N"))

"BAS" wrote:

Is it possible to perform an IF function on a certain character? For example:

In this model string, 0068T21N00A025T32E5X8Q4C4, I would like to perform an
IF function on the 11th character. If the 11th character = N, I would like
the true value = 0 and the false value = 1.

THanks,
B


BAS

IF function
 
It worked... THanks!

"Pete_UK" wrote:

Try this, with your data in A1:

=IF(MID(A1,11,1)="N",0,1)

Hope this helps.

Pete

On Jan 17, 4:32 pm, BAS wrote:
Is it possible to perform an IF function on a certain character? For example:

In this model string, 0068T21N00A025T32E5X8Q4C4, I would like to perform an
IF function on the 11th character. If the 11th character = N, I would like
the true value = 0 and the false value = 1.

THanks,
B




Pete_UK

IF function
 
You're welcome - glad it worked for you.

Pete

On Jan 17, 5:01*pm, BAS wrote:
It worked... THanks!



"Pete_UK" wrote:
Try this, with your data in A1:


=IF(MID(A1,11,1)="N",0,1)


Hope this helps.


Pete


On Jan 17, 4:32 pm, BAS wrote:
Is it possible to perform an IF function on a certain character? For example:


In this model string, 0068T21N00A025T32E5X8Q4C4, I would like to perform an
IF function on the 11th character. If the 11th character = N, I would like
the true value = 0 and the false value = 1.


THanks,
B- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 09:32 AM.

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