ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I test a cell for part of text (https://www.excelbanter.com/excel-worksheet-functions/9984-how-do-i-test-cell-part-text.html)

East London

How do I test a cell for part of text
 
How can I test only part of the text in a cell and if true return value of a
different cell

Bob Phillips

Use the LEFT, MID or RIGHT functions.

Eg A = ABCDEF

=IF(LEFT(A1,2)="AB",

=IF(MID(A1,2,2)="BC",

iF(RIGHT(A1,3)="DEF",

--

HTH

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


"East London" <East wrote in message
...
How can I test only part of the text in a cell and if true return value of

a
different cell





All times are GMT +1. The time now is 06:19 AM.

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