VB: Duplicate worksheet and insert data

cooperman82

New Member
Joined
Mar 15, 2011
Messages
1
Hi,

Could you please help me: I have two sheet in a workbook:
one called Enquiry and the second called Blank.

What i want is a macro that counts amount of lines on Enquiry and make copies of the Blank sheet names after the line names. i.e 1,2,3, etc.
But to also put the row of data next to each number on the blank.

Sorry if i am not explaining myself to brilliantly,

Enquiry will have rows from A6 to ? depending on size of enquiry numbered 1,2,3,4 etc with data on columns B to F. I need it count the amount of rows and make copies of the Blank to how many rows and then transfer the data in the individual rows (columns B to F) into cells B3 to F3 on the Blank sheet, corrosponding with the number of the row.

your help would be most appreciated
 

Some videos you may like

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.

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
not clear

suppose sample data is like this from A1 to F5

number data1 data2 data3 data4 data5
1 97 86 75 94 57
2
3 79 6 72 66 17
4

now row no.3 (number 2) is blank again row no. 5 number 4 is blank
you want row 2(number1) which is not blank is to be in row 1 in blank sheet
similarly you want rowno. 4(number3) which is not blank should be copied in row no. 2 in blank sheet.

is this what you want?

if so just copy the whole data ito blank sheet and sort descending order according to any one of the columns B to F
 

Watch MrExcel Video

Forum statistics

Threads
1,122,694
Messages
5,597,571
Members
414,156
Latest member
WDMix

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
Top