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

  • Home
  • SEARCH
  • 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 9193639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:12:53+00:00 2026-06-17T21:12:53+00:00

I have multiple columns if data and I need to create unique rows for

  • 0

I have multiple columns if data and I need to create unique rows for each LOC1 & LOC2:
Picture of mock-up:

LOC 1 LOC 2 FC      AMT Type
CUN   ABQ   LLA0PNR 10  AN1
CUN   AUS   BLA0PNR 15  NR2
CUN   GSP   QLA0PNR 16  AN1
CUN   DAL   HLA0PNR 14  NR2
CUN   HOU   WLA0PNR 13  AN1
CUN   ELP   RLA0PNR 12  AN3
CUN   MDW   OLA0PNR 11  NR4

Create:

CUN ABQ LLA0PNR 10  AN1
CUN ABQ BLA0PNR 15  NR2
CUN ABQ QLA0PNR 16  AN1
CUN ABQ HLA0PNR 14  NR2
CUN ABQ WLA0PNR 13  AN1
CUN ABQ RLA0PNR 12  AN3
CUN ABQ OLA0PNR 11  NR4
CUN     AUS     ......  ..      ...
CUN     AUS     ......  ..      ...

A row would be built for each LOC1 and LOC2 with all values in FC, AMT, Type which are constant.

  • 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-17T21:12:54+00:00Added an answer on June 17, 2026 at 9:12 pm

    It looks like you want the ‘Cartesian Product‘ of these two tables.

    Excel Option

    Here is my sample data (shortened since I am lazy about data entry 🙂

    Starting Data

    1. Create a ‘counter’ column, that increments by 1 for each row.

    2. Use excel formulas to determine which row to use from table1 and table2

    3. Use the excel function ‘INDEX’ to pull the content from each table, based on the row #s found in (2)

    enter image description here

    If you want to get fancier, you can alter the formulas to clear out after all 21 (21=7*3) entries like =IF(Counter>(B14*C14),"",--do stuff--).

    Here is an example Excel workbook, showing how it all comes together.

    SQL Option

    Though I know this is an excel question, I’d be remiss if I didn’t alert you to the right tool for the job. If you can run SQL on these tables, use:

    SELECT t1.*, t2.* FROM table1 t1, table2 t2;
    

    The default join for SQL is a Cartesian Product, so it all works out. This will be more elegant than convincing Excel to do it.

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

Sidebar

Related Questions

I have a NSTableView with multiple columns. clicking each of the columns sorts by
I need to create multiple records in sqlserver, each with the same value in
I have a need to create a report in DynamicJasper that has multiple subreports
I need to calculate and add to a data frame multiple new columns based
I am trying to unpivot a table with multiple rows and columns. Each row
I need to Create a table where 3 columns are needed and can have
I have multiple columns in a mySQL table. Three of the columns are named
I have CSV files that have multiple columns that are sorted. For instance, I
I have a table and this table contain multiple columns. I want to know
I have a file which has multiple columns, whitespace separated. e.g: data1 data2 data3

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.