Transposing data accross a fixed number of columns

LSQuinn

New Member
Joined
Aug 30, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to achieve the following -

Each day I import an updated spreadsheet with the following colums

LousQuinn_0-1692611996818.png


The data will grow each time it's imported but the headings will always stay the same.

I need to transpose the data accross the colums like

LousQuinn_1-1692612154251.png


The first name will be in column B (column A will be used for ID's which I create)

The headings created should run until 30 so start at Name and end at Name 30

After the 30th name and email has been transposed the 31st will drop below the first Name column again as per image, transpose to the 30th again, and keep repeating until all the data is transposed

LousQuinn_2-1692612497996.png


I've used the following function before to do something similar and wondered if it could be modified work for this scenario? (the emails visable are my own test emails)

=LET( Arr, TRANSPOSE(A2:C5), rws, ROWS(Arr), seq, SEQUENCE(,rws * COLUMNS(Arr),0), sqR, 1+MOD(seq, rws), sqC, 1+QUOTIENT(seq, rws), CHOOSE({1;2}, INDEX({"Name ","Email ","Phone "}, sqR) & sqC, INDEX(Arr, sqR, sqC)) )

Many thanks,

Lou
 
Just did some more testing and it appears to go wrong when I change (Sheet1!A1:E1 to (Sheet1!A1:C1 which I thought would be the correct thing to so as there are now 3 headings - Company, Email, Name, rather than the 5 we had before - this is when I get the #N/A headings?

Thanks,
Lou
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
That makes sense. You need to change the 150 to 90 as you now have 3 headers * 30 which is 90 rather than 5*30 which is 150
 
Upvote 0
Hi,
When I use the above formula and a formatted date is used in the sheet, the formatting changes from 02/11/2023 to 45232 - is there anyway to protect the formatted date when using the above formula please?
Thanks,
Lou
 
Upvote 0
You will just need to format the output cells.
 
Upvote 0

Forum statistics

Threads
1,215,080
Messages
6,123,013
Members
449,093
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top