Data from each row to 2 rows

VAS07

New Member
Joined
Oct 5, 2022
Messages
4
Office Version
  1. 2021
Platform
  1. Windows
Hello everyone! I was wondering if someone can help me: I have a tab which is my data set that horizontally has some football games (so home team and away team are in the same row but different columns). I want in another tab to create the data set as follows: row 1 home team from 1st game, row 2 away team from 1st game, row 3 home team from the 2nd game, row 4 away team from the 2nd game etc.
when I put =and bring the cell back, when I drag down the function it misses rows from the original data set tab. so it brings back:
Row 1: home team from row 1 (correct)
Row 2:away team from row 1 (correct)
Row 3: home team from row 3 (wrong-I want the home team from row 2)
Row 4: away team from row 3 (wrong-I want the away team from row 2)

Any help will be much appreciated! Thank you!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
MrExcelPlayground12.xlsx
ABCD
1HomeAway
2GiantsJetsGiants
3CowboysSteelersJets
4OilersBrownsCowboys
5CardinalsBearsSteelers
6DolphinsChargersOilers
7Browns
8Cardinals
9Bears
10Dolphins
11Chargers
Sheet22
Cell Formulas
RangeFormula
D2:D11D2=INDEX(A2:B6,INT((SEQUENCE(2*ROWS(A2:B6))-1)/2)+1,MOD(SEQUENCE(2*ROWS(A2:B6))-1,2)+1)
Dynamic array formulas.
 
Upvote 0
=INDEX(A2:B6,INT((SEQUENCE(2*ROWS(A2:B6))-1)/2)+1,MOD(SEQUENCE(2*ROWS(A2:B6))-1,2)+1)
Hello and thanks for your answer! I try to apply it in my version of excel dragging data from the other tab and keep getting an error:
=INDEX('2021-2022'!E2:F365;INT((SEQUENCE(2*ROWS('2021-2022'!E2:F365))-1)/2)+1;MOD(SEQUENCE(2*ROWS('2021-2022'!E2:F365))-1;2)+1)
Can you trace what is wrong?
 
Upvote 0
It doesn't need dragging. Just put it where you want the whole output column. It will spill.
 
Upvote 0

Attachments

  • Στιγμιότυπο οθόνης (49).png
    Στιγμιότυπο οθόνης (49).png
    204.9 KB · Views: 4
Upvote 0
My guesses - you aren't running excel 2021 here, or commands in excel are different in different languages?

If you type "=INDEX(" into a cell, it should try to help you with the formula. Try that for INDEX, SEQUENCE, MOD, ROWS - to see what isn't recognized.
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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