Solved

Excel If statement

Posted on 2011-02-21
4
890 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

752 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