Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8012841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:27:28+00:00 2026-06-04T19:27:28+00:00

I have a bunch of rows in a Google Spreadsheet that look as such:

  • 0

I have a bunch of rows in a Google Spreadsheet that look as such:

a,b,c,d
a,d
c,d
b,d,f
a,b,f,g,h,i
q,b,b

…And on.

I need a way to create a unique list of related pairs in this format:

a,b
a,c
a,d
b,c
b,d
c,d
b,f
d,f
a,f
a,g
a,h
a,i

…And on.

Any idea how I’d do that? I’m open to answers using Google Spreadsheet’s scripting language, Excel 2004’s scripting language or something else like PHP.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:27:29+00:00Added an answer on June 4, 2026 at 7:27 pm

    Not sure if this satisfies your platform requirements, but here is a spreadsheet formula that can be used in Google Spreadsheets itself (not in any Excel version though):

    =ArrayFormula(SORT(TRANSPOSE(SPLIT(CONCATENATE(REPT(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);",")))&","&TRANSPOSE(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);","))));(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);",")))<=TRANSPOSE(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);",")))))*REGEXMATCH(CONCATENATE(","&SUBSTITUTE(A:A;",";",,")&","&CHAR(9));"(,"&UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);",")))&",[^\t]*,"&TRANSPOSE(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);","))))&",)|(,"&TRANSPOSE(UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);","))))&",[^\t]*,"&UNIQUE(TRANSPOSE(SPLIT(JOIN(",";A:A);",")))&",)"))&CHAR(9));CHAR(9)))))
    

    It also assumes you don’t want to list “b,a” as well as “a,b”.

    EDIT: These sort of formulae can be horribly inefficient for very large data sets, so consider only using if processing a few hundred rows or less.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Mysql2::Result that has a bunch of rows in it. The results
I have a query that returns a bunch of rows. But using the same
I have a query that selects a bunch of rows from various tables and
I have a bunch of rows in Excel that I want to paste into
I have a bunch of rows in a database that all contain an element
i have bunch of rows containing http://www.domainname.com i need to update those so http://
I have a bunch of table rows that I'm hiding/showing using checkboxes and jQuery.
I have a SQL query that outputs a bunch of rows that match a
I have a table with 7 cells and a bunch of rows. I want
I have a bunch of html files that come with my app and are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.