Extracting from 3-d range to a column...

galadiman

Board Regular
Joined
Apr 4, 2007
Messages
66
I have a workbook with about 30 pages. I'd like to extract two cells from each of the 30 pages without manually typing (or clicking) each cell on each page. When I select all the sheets and click one of the cells, then try to 'paste special", it gives me an error.

Is there an easy way to convert a 3-d range to a 2-d range?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
HI
Paste the following codes in the macro window ( Alt F11)

Code:
Sub extract()
for a = 2 to sheets.count
cells(a,1) = worksheets(a).name
cells(a,2) = worksheets(a).cells(1,1)
cells(a,3) = worksheets(a).cells(1,2)
next a
endsub
run the macro. It will extract data from A1 and B1 from all sheets into first sheet.
Ravi
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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