Solved

Excel If statement

Posted on 2011-02-21
4
891 Views
Last Modified: 2012-05-11
Using IF NOT in excel 2010

I have a column of domain names that I would like to separate by extension.

domain.com
domain11.co.uk
domina123.co
domain222.org.uk
domain6645.net

If I use  =IF(ISNUMBER(SEARCH(".co",A4)),A4) it will return the domain name Only if it contains .co and not .org.uk or.net however it also returns .co.uk and .com as they both contain .co as well!

How can I separate to JUST the .co or just the .org without the inclusions using some type of =if but NOT statement?

Many thanks
0
Comment
Question by:Dexterstevens
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 125 total points
ID: 34947615
=IF(RIGHT(A4,4)=".org"),A4,"")                   returns just cells ending in .org
0
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 125 total points
ID: 34947630
Hello,

so you only want the ones ending in .co ? If so, maybe try

=IF(RIGHT(A1,2)="co",A1,"")

cheers, teylyn
0
 
LVL 81

Expert Comment

by:byundt
ID: 34947634
You can peel off just the com, co, uk or other domain using a formula like:
=TRIM(RIGHT(SUBSTITUTE(A1,".",REPT(" ",20)),4))

You can then sort by the results of that formula to get your list.
0
 
LVL 50
ID: 34947666
Thanks for the grade.

One more thought:

You could use text to columns with the . as the delimiter, then use Data > Filter to show just the rows with the extensions you want.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question