Populating Multiple Columns and Rows based on number of sheets

hartjonathand

New Member
Joined
May 23, 2016
Messages
18
Hey guys,

I think I generally have an idea of what I'm doing on populating columns in multiple sheets, adding data from other sheets.

My question is related to being able to insert rows based on the number of worksheets in the workbook.

Thinking about this the process would be

Count the number of worksheets
For each worksheet i in workbook
add a row starting at row "a"
iterate until populated for first matrix

repeat for matrix below.

Thanks all.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Not entirely sure what you are after, but this will insert as many rows as there are sheets starting in row 2
VBA Code:
Sub hartjonathand()
   Rows(2).Resize(Worksheets.Count).Insert , xlDown
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

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