Any Function to do this?

Abbas999

Board Regular
Joined
Jan 4, 2015
Messages
102
Hi all members,

I need your help, Check pic below:

Before:
23keqyp.jpg


After:
20g1ic2.jpg


I want the data:
First Min_ab001 then Max_ab001
Then Min_ab002 and Max_ab002 and so on...

Please Help me if anyone knows a method.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">A5</th><td style="text-align:left">=INDEX(<font color="Blue">$A$1:$F$2,MOD(<font color="Red">COLUMNS(<font color="Green">$A5:A5</font>)-1,2</font>)+1,INT(<font color="Red">(<font color="Green">COLUMNS(<font color="Purple">$A5:A5</font>)-1</font>)/2</font>)+1</font>)</td></tr></tbody></table></td></tr></table><br />

and drag across



Excel 2013
ABCDEFGHIJK
1min_ab001min_ab002min_ab003min_ab004min_ab005min_ab006
2max_ab001max_ab002max_ab003max_ab004max_ab005max_ab006
3
4
5min_ab001max_ab001min_ab002max_ab002min_ab003max_ab003min_ab004max_ab004min_ab005max_ab005min_ab006
Sheet2
 
Upvote 0
Hi.

=INDEX($A$1:$G$2,1+ISEVEN(COLUMNS($A:A)),EVEN(COLUMNS($A:A))/2)

Copy to the right as required.

Regards
 
Upvote 0
Hi,try this:
Code:
Sub aaa()
Dim a&, i&, j&, tbl1

a = Cells(1, Columns.Count).End(xlToLeft).Column
tbl1 = Range(Cells(1, 1), Cells(2, a))
Rows("1:2").ClearContents
For i = 1 To a
  For j = 1 To 2
     x = x + 1
     Cells(1, x).Value = tbl1(j, i)
  Next j
Next i
End Sub
Best regards.
 
Upvote 0
Solved! Many thanks. But i have another problem.
I also have the MIN_ab001 and Max_ab001 values that need to pasted into the columns. But The order is not right. See the pic below to understand.
t9vbbd.jpg


Worksheet Formulas
CellFormula
A5=INDEX($A$1:$F$2,MOD(COLUMNS($A5:A5)-1,2)+1,INT((COLUMNS($A5:A5)-1)/2)+1)

<thead>
</thead><tbody>
</tbody>



and drag across


Excel 2013
ABCDEFGHIJK
1min_ab001min_ab002min_ab003min_ab004min_ab005min_ab006
2max_ab001max_ab002max_ab003max_ab004max_ab005max_ab006
3
4
5min_ab001max_ab001min_ab002max_ab002min_ab003max_ab003min_ab004max_ab004min_ab005max_ab005min_ab006

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,521
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