Restructure list form from horizontal to vertical based on condition

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
333
Office Version
  1. 365
Platform
  1. Windows
I dont know if this is possible using excel formula..

so i have a long range of column with data. see below example.. the idea is i want to rearrange the list to vertical but to non empty cell only (under issued/expired).. for example name 1 it got non empty cell (with x) under apple, cherry and got.. from that it needs to rearrange the list vertically including the names. Please see expected result at cell A16... thank you




Book1.xlsx
ABCDEFGHIJKLMNOPQ
1applebananacherryberryorangedogcat
2namedept.postionissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpired
3Name1datadataXXXXXX
4Name2datadataXXXX
5Name3datadata
6Name4datadataXXXXXXXX
7Name5datadataXX
8Name6datadataXXXXXXXX
9
10where X can be text or dates
11
12
13
14EXPECTED RESULT
15
16Name1apple
17Name1cherry
18Name1cat
19Name2banana
20Name2orange
21Name4apple
22Name4cherry
23Name4orange
24Name4cat
25Name5banana
26Name6apple
27Name6banana
28Name6berry
29Name6dog
Sheet3
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Like this?

24 10 19.xlsm
ABCDEFGHIJKLMNOPQ
1applebananacherryberryorangedogcat
2namedept.postionissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpired
3Name1datadata15/10/2024XXXXX
4Name2datadata8/08/2024XXX
5Name3datadata
6Name4datadataXXabcdXXXXX
7Name5datadataXX
8Name6datadataXXXXXXXX
9
10
11
12
13
14RESULT
15
16Name1apple
17Name1cherry
18Name1cat
19Name2banana
20Name2orange
21Name4apple
22Name4cherry
23Name4orange
24Name4cat
25Name5banana
26Name6apple
27Name6banana
28Name6berry
29Name6dog
To vertical
Cell Formulas
RangeFormula
A16:B29A16=TEXTSPLIT(TEXTJOIN("|",1,IF(D3:Q8<>"",IF(D2:Q2="issued",A3:A8&";"&D1:Q1,""),"")),";","|")
Dynamic array formulas.
 
Upvote 0
Solution
Another option
Fluff.xlsm
ABCDEFGHIJKLMNOPQ
1applebananacherryberryorangedogcat
2namedept.postionissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpiredissuedexpired
3Name1datadataXXXXXX
4Name2datadataXXXX
5Name3datadata
6Name4datadataXXXXXXXX
7Name5datadataXX
8Name6datadataXXXXXXXX
9
10
11
12
13
14
15
16Name1apple
17Name1cherry
18Name1cat
19Name2banana
20Name2orange
21Name4apple
22Name4cherry
23Name4orange
24Name4cat
25Name5banana
26Name6apple
27Name6banana
28Name6berry
29Name6dog
30
Main
Cell Formulas
RangeFormula
A16:B29A16=HSTACK(TOCOL(IF((D3:Q8<>"")*(D1:Q1<>""),A3:A8,1/0),2),TOCOL(IF((D3:Q8<>"")*(D1:Q1<>""),D1:Q1,1/0),2))
Dynamic array formulas.
 
Upvote 1

Forum statistics

Threads
1,223,061
Messages
6,169,875
Members
452,288
Latest member
neplecha

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