ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with nested conditional formula (https://www.excelbanter.com/excel-discussion-misc-queries/236475-re-help-nested-conditional-formula.html)

Lars-Åke Aspelin[_2_]

Help with nested conditional formula
 
On Sat, 27 Jun 2009 09:41:51 -0700 (PDT), GARY
wrote:

If M6 contains "J" or "L"
if the third character in M6 is a "-"
I want S6 to contain ""X"
else, I want S6 to contain "Y"
else, I want S6 to contain "Z".

How do I write the formula?


Try this formula in cell S6:

=IF(AND(ISERROR(FIND("J",M6)),ISERROR(FIND("L",M6) )),"Z",IF(MID(M6,3,1)="-","X","Y"))

Hope this helps / Lars-Åke


All times are GMT +1. The time now is 06:58 PM.

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