Solved

Excel If statement

Posted on 2011-02-21
4
885 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
  • 2
  • 2
4 Comments
 
LVL 80

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:teylyn
teylyn 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 80

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

Expert Comment

by:teylyn
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now