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 466539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:29:25+00:00 2026-05-12T23:29:25+00:00

I have a row of data as follows: header1 header2 header3 header4 header5 row

  • 0

I have a row of data as follows:

            header1      header2      header3      header4      header5
row key     datavalue1   datavalue2   datavalue3   datavalue4   datavalue5....

so basically, I have a denormalized data set where the datavalues may or may not be empty on a row-by-row basis. I need to normalize them.

ie

12345678    NULL         10           3            NULL         14

would become:

12345678   header2   10
12345678   header3   3
12345678   header5   14

I could do this by using a paste special transform, but I have thousands of rows and I’d need to make sure that I get the right row key for each. furthermore, each row has a bunch of descriptives associated with it that I need copied over with each datavalue.

What is the easiest way to convert each row of columns such that I have multiple rows of a single column with all non-empty datavalues plus the associated datavalue reference? I need to be able to pivot the dataset.

  • 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-05-12T23:29:26+00:00Added an answer on May 12, 2026 at 11:29 pm

    If you have five “header” columns, enter these formulas

    H1: =OFFSET($A$1,INT((ROW()-1)/5)+1,0)
    I1: =OFFSET($A$1,0,IF(MOD(ROW(),5)=0,5,MOD(ROW(),5)))
    J1: =INDEX($A$1:$F$9,MATCH(H1,$A$1:$A$9,FALSE),MATCH(I1,$A$1:$F$1,FALSE))
    

    Copy H1:J?? and paste special values over the top. Sort on column J and delete anything that’s a zero. If you have legitmate zeros in the data, then you first need to replace blank cells with some unique string that you can then delete later.

    If you have more columns, then replace the ‘5’ in all the above formulas with whatever number you have.

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

Sidebar

Related Questions

I have a row of data that I need to modify in a database,
I have a C# console app App1 that reads a row of data from
I have CSV data loaded into a multidimensional array. In this way each row
I have some data presented in WPF Grid as follows: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto
MS SQL Server doesn't have row level triggers, correct? If I needed to insert
I have a row of buttons, which all create a pdf file which I
If I have records: Row Date, LocationID, Account 1 Jan 1, 2008 1 1000
I have a MySQL table that will only have one row. What should my
Say I have an ID row (int) in a database set as the primary
I have a million rows in a database table. For each row I have

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.