# Transposition lookup

#### Salamullah

##### Board Regular

 Horizontal Volume Profit Product Jan Feb Mar Jan Feb Mar A 10 40 70 120 520 1680 B 20 50 80 180 250 720 C 30 60 90 150 180 600 Vertical Product Month Volume Profit A Jan 10 120 B Jan 20 180 C Jan 30 150 A Feb 40 520 B Feb 50 250 C Feb 60 180 A Mar 70 1680 B Mar 80 720 C Mar 90 600
<colgroup><col width="64" style="width: 48pt;" span="8"> <tbody> </tbody>

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Formula or VBA solution required?

VBA solution

Code:
``````Sub k1()
Lastrow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
k = 2
For i = 2 To 4
For j = 4 To Lastrow
k = k + 1
Worksheets("Sheet2").Cells(k, 1) = Worksheets("Sheet1").Cells(j, 1)
Worksheets("Sheet2").Cells(k, 2) = Worksheets("Sheet1").Cells(3, i)
Worksheets("Sheet2").Cells(k, 3) = Worksheets("Sheet1").Cells(j, i)
Worksheets("Sheet2").Cells(k, 4) = Worksheets("Sheet1").Cells(j, i + 4)
Next j
Next i

End Sub``````

Input on Sheet1 with Horizontal in A1
Output on Sheet2

Hi Special,

Many thanks and sorry for the late reply I have multi tabs so if excel formula is availble than it will be great !

Replies
1
Views
75
Replies
2
Views
254
Replies
2
Views
491
Replies
11
Views
609
Replies
0
Views
240

1,214,253
Messages
6,118,502
Members
448,828
Latest member
Pebl

### 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.

### Which adblocker are you using?

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

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