# Excel formula help

Hi

I am trying to extract the gender from our product code and have this formula

=IF(ISNUMBER(SEARCH("wmns",J10)),"F","M")

This searches in J10 for the text Wmns and works great but I also need to get it to look at another column

so if J10 or N10 contain WMNS set as F otherwise M not sure how to tweak the formula to look at two different cells.

Thanks
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,

pls try

``````=IF(ISNUMBER(SEARCH("wmns",J10&N10)),"F","M")
``````

Regards
Author Commented:
Hi Sorry typo and mistake on my part the data in N10 will be different WMN not Wmns :

so if J10 contains WMNS or N10 contain WMN set as F otherwise M not sure how to tweak the formula to look at two different cells for the two slightly different values

Thanks

=IF(ISNUMBER(SEARCH("wmns",J10)),"F","M")     (- or if N10 = wmn set to F)
Commented:
Would it be ok

=IF(ISNUMBER(FIND("wmn",LOWER(J10&N10))),"F","M")

EDIT
OR the long way

=IF(OR(ISNUMBER(FIND("wmns",J10)),ISNUMBER(FIND("WMN",N10))),"F","M")

Regards

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

IT ManagerCommented:
To expand slightly on the above, my concern would be that you are returning the M result even if both cells are blank.
This may not be what you want.
To check that they contain some text at least, try this
=IF(AND(ISBLANK(J11),ISBLANK(N11)),"",IF(ISNUMBER(SEARCH("wmns",J11&N11)),"F","M"))
Author Commented:
Perfect many thanks the long way did the trick.
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.