Wraprows for Excel 2019 version

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
300
Office Version
  1. 365
Platform
  1. Windows
For Excel version 2019


i have this table.. my formula returns horizontally the same as source data. i would like to arrange it vertically by group of 3. would it be possible using excel 2019?


Excel.xlsm
ABCDEFG
1NicknameAmount1OR No.1Date1Amount2OR No.2Date2
2Chile36.97111-Jul-20244641416-Oct-2024
3Rwanda72.8422-Oct-202472.8422-Oct-2024
4Ethiopia21.22325-Feb-202421.22325-Feb-2024
5Zimbabwe6.47427-Jun-20246.47427-Jun-2024
6Uganda66.79523-Nov-202466.79523-Nov-2024
7Uzbekistan42.8769-May-202442.8769-May-2024
8Sudan62.34724-Jun-202462.34724-Jun-2024
9Tonga54.11817-May-202454.11817-May-2024
10Poland62.84914-Dec-202462.84914-Dec-2024
11Panama66.381030-Nov-202466.381030-Nov-2024
12
13
14
15
16
17
18SEARCHCHILE
19CURRENT FORMULA RESULT
20Amount1OR No.1Date1Amount2OR No.2Date2
2136.97111-07-244641416-10-24
22
23
24
25
26EXPECTED RESULT
27AmountORDATE
2836.97111-07-24
294641416-10-24
30
31
32
AGRESEARCH (2)
Cell Formulas
RangeFormula
B21:G21B21=IFERROR(INDEX($B$2:$G$14,AGGREGATE(15,6,(ROW($B$2:$B$14)-ROW($B$2)+1)/(ISNUMBER(SEARCH($C$18,$A$2:$A$14)) ),ROWS($B$21:B21)),COLUMNS($B$21:B21)),"")
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Power Query:

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    cols = {"Amount","OR","DATE"},
    toList = Table.ToColumns(Table.RemoveColumns(Source,{"Nickname"})),
    comb = List.Accumulate({{0,3},{3,3}},#table({}, {}),(s,c)=> Table.Combine({s, Table.FromColumns(List.Range(toList,c{0},c{1}),cols)})),
    result = Table.Sort(comb,{{"OR", Order.Ascending}})
in
    result

1716802435976.png
 
Upvote 0
Here another code with less custom functions

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    t1 = Table.SelectColumns(Source,{"Amount1", "OR No.1", "Date1"}),
    t2 = Table.RenameColumns(Table.SelectColumns(Source,{"Amount2", "OR No.2", "Date2"}),{{"Amount2", "Amount1"}, {"OR No.2", "OR No.1"}, {"Date2", "Date1"}}),
    result = Table.Sort(Table.Combine({t1,t2}),{{"OR No.1", Order.Ascending}})
in
    result
 
Upvote 0

Forum statistics

Threads
1,216,499
Messages
6,131,012
Members
449,613
Latest member
MedDash99

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