Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delete the first row of every worksheet

Posted on 2011-03-15
2
Medium Priority
?
212 Views
Last Modified: 2012-05-11
I simply need to delete the first row of every worksheet in an Excel workbook.
0
Comment
Question by:thomasd04
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 35139407
Manually, you can select the first sheet, hold Shift and click the last sheet tab, then delete the first row.
In code:
Sub DelRow1()
   Dim wks as Worksheet
   For each wks in activeworkbook.worksheets
      wks.rows(1).delete
   next wks
End sub

Open in new window

0
 
LVL 3

Author Comment

by:thomasd04
ID: 35139514
Thanks! The VB code worked perfectly.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question