how to write nested if condition

genetist

Board Regular
Joined
Mar 29, 2013
Messages
75
Office Version
  1. 2016
Platform
  1. Windows
Hi to all,
I need help in solving my problem, My data look like this
Parentssx1sx2sx3sx4sx5sx1sx2sx3sx4sx5
P1AAZZ//AAGG
P2GGGGAAAAGG
my IF result
Parentssx1sx2sx3sx4sx5sx1sx2sx3sx4sx5
P1AAZZ//AAGG
P2GGGGAAAAGGpolypolypolymonomono
Expected
Parentssx1sx2sx3sx4sx5sx1sx2sx3sx4sx5
P1AAZZ//AAGG
P2GGGGAAAAGGpolymonomonomonomono

<colgroup><col span="11"></colgroup><tbody>
</tbody>

<tbody>
</tbody>
my if condition is like this =if(A2=A1,"mono","poly") but i want mono in the cells where there are ZZ and // this characters also. How can i write if condition formula to get my expected result?
help need in this issue
Thanks in advance,
Regards,
Genetist
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Not a nested if, but it does what you want (If P1 or P2 is ZZ or //; or if P1=P2).

=IF(OR(A1="ZZ";A1="//";A2="ZZ";A2="//";A1=A2)=TRUE;"mono";"poly")
 
Upvote 0
try below

=IF(A1=A2,"mono",IF(OR(A1="ZZ",A1="//"),"mono",IF(OR(A2="ZZ",A2="//"),"mono","poly")))
 
Upvote 0
Hi
ARAVIND and Jefrey20 thank you very much for your help and spending your valuable time to help me. your formula is working and i adjusted according to my requirement.
Thanks lot
Regards,
genetist
 
Upvote 0

Forum statistics

Threads
1,214,630
Messages
6,120,634
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top