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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
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,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

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