Fetching last column values for specific rows of a sheet and displaying as rows in another sheet

shanck

New Member
Joined
Jun 4, 2015
Messages
2
Hi All,

I am totally a novice to this forum and VBA as well.Please help me in writing a code for the below.

I have more than 100 rows and 117 columns.My task is to fetch last column values for specific rows and display as rows in another sheet.Could someone please help me on this.
Any help would be really grateful.

The code here is for all values(All column values of those specific rows).Could you help me in changing the code only for last column values.

Code for directly converting rows in a sheet to columns of another sheet------


Sub RowstoColumns()
Dim x, z
x = Sheets("Daily").[A1].CurrentRegion
z = Application.Index(x, Application.Transpose(Array(24, 2, 12, 22, 23)), [transpose(row(1:117))])
Sheets("Sheet2").[A1].Resize(UBound(z, 2), 5).Value = Application.Transpose(z)
End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,
I know very little English.I hope I have understood correctly.

Code:
Sub RowstoColumns()
    Dim x, z
    x = Sheets(1).[a1].CurrentRegion
    z = Application.Index(x, Array(24, 2, 12, 22, 23), [(row(1:117))])
    Sheets(2).[a1].Resize(UBound(z, 1), UBound(z, 2)).Value = z
End Sub
 
Upvote 0

Forum statistics

Threads
1,203,069
Messages
6,053,347
Members
444,654
Latest member
Rich Cohen

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