+ Reply to Thread
Results 1 to 8 of 8

Ordering Links by Domain

  1. #1
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    107

    Ordering Links by Domain

    We have this table (Attached xlsx)

    3Eh6W3n.png

    The first 5 columns have disordered links and some are mising. But we know that:
    - There could be one for Telegram that has "t.me"
    - There could be one for Reddit that has "reddit.com"
    - There could be one for Github that has "github.com"
    - There could be one for Twitter that has "twitter.com"
    - And there could be one for the website

    The desired output is to have the links ordered next to them

    So how can we do it?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,597

    Re: Ordering Links by Domain

    Where have you mocked up the results you want from the sample data? I don't see them.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    107

    Re: Ordering Links by Domain

    Hi AliGW, and thanks for the reply.

    I should have added a couple of rows as an example in the "ordered links" columns.

    Here:
    8CRTRBm.png

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,273

    Re: Ordering Links by Domain

    For Reddit, Github, Twitter, and Telegram, try these:
    =IFERROR(INDEX(Tabla1[@[Link 1]:[Link 5]],,MATCH("*reddit*",Tabla1[@[Link 1]:[Link 5]],0)),"")
    =IFERROR(INDEX(Tabla1[@[Link 1]:[Link 5]],,MATCH("*github*",Tabla1[@[Link 1]:[Link 5]],0)),"")
    =IFERROR(INDEX(Tabla1[@[Link 1]:[Link 5]],,MATCH("*twitter*",Tabla1[@[Link 1]:[Link 5]],0)),"")
    =IFERROR(INDEX(Tabla1[@[Link 1]:[Link 5]],,MATCH("*t.me*",Tabla1[@[Link 1]:[Link 5]],0)),"")

    I don't have an answer yet about the regular website. I'll post back when I've got that.

  5. #5
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    107

    Re: Ordering Links by Domain

    Hi Gregb11

    Perfect.. That worked like a charm. Thanks a million.

    About the website, could it be extracted with nested ifs as an else? like if not (everything else) then Website?
    Last edited by nicoan; 05-10-2021 at 08:44 AM.

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,273

    Re: Ordering Links by Domain

    The the Website, when there is a website URL, if it's always in link 1 (like in your sample file), you could do this:

    =IF(COUNTIFS(Tabla1[@[Reddit]:[Telegram]],[@[Link 1]])=0,[@[Link 1]],"")

    But if it can be anywhere, try this:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    107

    Re: Ordering Links by Domain

    Yep, the first formula did it. Good eye.

    Thanks a million Gregb11!!

  8. #8
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,273

    Re: Ordering Links by Domain

    Glad it worked and that I could help, and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  2. Replies: 0
    Last Post: 09-16-2013, 04:16 AM
  3. Sort Email by domain and move domain group to new list
    By grandparocks in forum Excel General
    Replies: 4
    Last Post: 01-06-2013, 09:04 PM
  4. how to convert url to domain name
    By pepdeal in forum Excel General
    Replies: 3
    Last Post: 06-13-2012, 01:36 PM
  5. Add @domain.com
    By Ambrosia242 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2009, 01:12 PM
  6. Excel 2007 : vlookup-DOMAIN
    By 1apple in forum Excel General
    Replies: 2
    Last Post: 01-21-2009, 02:27 AM
  7. Replies: 0
    Last Post: 06-03-2006, 12:10 PM
  8. Can this be done with Domain Functions?
    By Johnny Meredith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2006, 09:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1