Insert blank rows

Rather than using the control button to select every other row, which can be 
very time consuming when you have more than 100 rows, I am trying to figure 
out how to auto-insert blank rows between pre-populated rows of information.
0
Utf
12/18/2009 9:19:02 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
984 Views

Similar Articles

[PageSpeed] 3

Deb,

Try this macro. ALT+F11 to open VB editor. Right click 'ThisWorkbook' and 
insert module and paste the code in on the right . Change the sheet name to 
your sheet and run the code

Sub insert_rows()
Dim ws As Worksheet, x as long
Set ws = Sheets("Sheet3")
lastrow = ws.Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = lastrow To 2 Step -1
    ws.Rows(x).EntireRow.Insert
Next
End Sub


Mike

"Deb" wrote:

> Rather than using the control button to select every other row, which can be 
> very time consuming when you have more than 100 rows, I am trying to figure 
> out how to auto-insert blank rows between pre-populated rows of information.
0
Utf
12/18/2009 9:31:01 PM
Blank rows within your data range will give you problems with copy, paste,
sort, filter and probably other functions.

Do you really need those blank rows?

If just for appearance, doubling the row heights may help you.


Gord Dibben  MS Excel MVP

On Fri, 18 Dec 2009 13:19:02 -0800, Deb <Deb@discussions.microsoft.com>
wrote:

>Rather than using the control button to select every other row, which can be 
>very time consuming when you have more than 100 rows, I am trying to figure 
>out how to auto-insert blank rows between pre-populated rows of information.

0
Gord
12/19/2009 8:14:21 PM
Reply:

Similar Artilces:

updatable and changable row source
In my form that contain one text box (unbound) at the top and one list box in down, when I start the typing in the text box the row source of list box that is the query that depend on the text box (parameter) automatically updated and show the records in the list box. Best regards. Masoud wrote: >In my form that contain one text box (unbound) at the top and one list box in >down, when I start the typing in the text box the row source of list box that >is the query that depend on the text box (parameter) automatically updated >and show the records in the list box. Tha...

Change Row Fill Color
I'm having a problem that I'm pretty sure can only be resolved with some type of Macro. I would like to know if it is possible to change the fill color of an entire row when text is entered in a specific cell within that row. For example. When "Not Received" is entered in cell C3, I would like all of row 3 to be filled with light blue. If something else is entered in that same cell (e.g. "Received"), I do not want the fill color to change at all. I know it's possible to change a single cell this way using Conditional Formatting, but how do you apply...

Moving data in a large cell range to one row
I have data in cell range A1:R34. All of the data needs to be in column A. Instead of cutting and pasting each row or column in the range, is there a way to move all of this data quickly to column A? Thanks for the help. Hi and how do you want it to move into this column?. Best would be you give an example -- Regards Frank Kabel Frankfurt, Germany "Todd" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:1b3101c4a270$9123dce0$a301280a@phx.gbl... > I have data in cell range A1:R34. All of the data needs > to be in column A. Instead of cutting and ...

Adding SOP number to POP blank form
I'd like to know how to add the SOP number to the POP form in GP 8.0. I realize in the earlier version you were able to configure the SOP_POPLink table relationships to POP_PO however I can't seem to configure this in 8.0. Is there a new report writer function? Thanks, ...

Insert .psd in Publisher 2003
I'm trying to insert a logo that is a .psd into Publisher. When I hit insert, it asks me what I'm trying to convert from. What do I do? Is it possible to insert a photoshop file, or do I need to convert it first? You'll need to change the format of the Photoshop file before you insert it in your document. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "brenda" <brenda@discussions.microsoft.com> wrote in message news:7F8C6E5D-C83E-4FEC-92D8-CFA24A00AA92@microsoft.com... > I'm trying to ...

print heading row on every page
I followed the instructions for getting a heading row to repeat on every page, but I couldn't get it to work. In order to have rows repeat on every page, Go to File/Page Setup/Sheet and select the rows to repeat at top. "Betty" wrote: > I followed the instructions for getting a heading row to repeat on every > page, but I couldn't get it to work. > > Hmm....be more specific on what are you getting. Anyway... File -> Page Setup -> Sheet -> Print title: "Rows to repeat at top" Betty Wrote: > I followed the instructions for gett...

insert row when cell full, auto wrap
Hi there, I used this code in ver 2003 to insert a row and wrap text in a cell..BUT, it does not work in ver 2007. Any ideas? Much appreciated. Private Sub Worksheet_Change(ByVal Target As Range) Dim NewRwHt As Single Dim cWdth As Single, MrgeWdth As Single Dim c As Range, cc As Range Dim ma As Range With Target If .MergeCells And .WrapText Then Set c = Target.Cells(1, 1) cWdth = c.ColumnWidth Set ma = c.MergeArea For Each cc In ma.Cells MrgeWdth = MrgeWdth + cc.ColumnWidth Next Application.ScreenUpdating = False ma.MergeCells = False c.ColumnWidth = ...

Adding row to a table
I have appreciated the input of g. mayor and have found his "An alternative method of adding a row to a protected table" (http://www.gmayor.com/word_vba_examples.htm) to be quite helpful. It is designed to be an 'exit macro' and I am trying to use it in a slightly different way. My issue is that as a user tabs through a form they will always come to the last cell and tabbing to the next formfield just creates another row. So I am attempting to set up a button (commandbutton) that will run the macro and add an additional row 'on demand.' I have this...

VLOOKUP and highlight row
Hi gang, So I have a spreadsheet with 20,000 items listed by UPC code. The top 5 rows are in freeze pane mode with some direction as how to use, in cell B3 I have a empty cell where the user enters a UPC number, the cell next to it has a vlookup function that finds the item and returns the wholesale cost found in column 6 - easy enough. =VLOOKUP(B3,A6:J20012,6,FALSE) I would like it IF when vlookup finds the UPC code to highlight the entire row because the user may need to look at other data. As if you were to scroll down manually, find the row and highlight with a mouse click...

X and Z reports come up blank for shifts.
Does anyone have an idea why X & Z reports would come out blank, When we know for sure that there was activity in the store. This happen to one of our clients before, but we were never able to replicate the error to figure out why this happen in the first place. Any ideas would be helpful thx cj Blanks usually mean that no template was selected for reports in the Receipt Format properties. I had one where a reprot printed but all the values were zero - that was a different issue, but I can't remember what it was - I think we just deleted the receipt format and started over, bu...

Converting a column of information into a row of information
I was curious if anyone knew of a way to convert a column into a row Essentially we receive a spreadsheet a few times a month that has a fe columns of information. Our database however can only accept cs uploads and they have to follow a very strict template. In order t properly upload the data that we are receiving I would need to turn columns into rows (or optimally into a single cell with each piece o data from that column separated by a comma). Our template works as follows. We have rows for contact name, address phone number, ect... At the end of the spreadsheet there are 3 column in w...

copy a row of data to a column in another workbook?
I am trying to get the data i enter into my charity subscription workbook, to be automatically updated in my gift aid register (workbook) so that i do not have to input twice. The data is entered into the subs register in rows and the gift aid register is entered in columns. Any ideas would be appreciated. hi, =('H:\CodeStuff\[ConnectPaths.xls]Sheet1'!D4) a formula like this in your gift aid register wb will draw the data over from your charity subscription wb. I don't know your file paths so you will have to change it to fit your set up. in the gift aid register wb, put the ...

How do I unhide The first column or row
After hiding the first column or row in Excel, how do I unhide it One way: Enter A1 in the Name Box on the left side of the formula bar and type Enter. Choose Format/Row/Unhide or Format/Column/Unhide In article <26178EB3-8474-4C26-9087-75487987BBFB@microsoft.com>, ashekumar <ashekumar@discussions.microsoft.com> wrote: > After hiding the first column or row in Excel, how do I unhide it Another way - click in the column B label and drag into the empty box above the row numbers, then right-click and choose unhide same process to unhide the first row, but drag fr...

Selecting Many Non-Adjacent Rows Easily
In a spreadheet with 100's of rows, how do I easily or automatically select non-adjacent rows at a constant interval, eg every 5 rows of an 800 row sheet? Hi, Assign this macro to a keyboard shortcut. Sub jumpLines() jumpLine = 5 Selection.Offset(jumpLine, 0).Select End Sub jeff >-----Original Message----- >In a spreadheet with 100's of rows, how do I easily or automatically select non-adjacent rows at a constant interval, eg every 5 rows of an 800 row sheet? >. > What are you looking to achieve? It may be that there are far easier ways of doing what you want. -- ...

Ability to insert a row to the Payroll Quick Entry
I would like to make the following suggestion with respect to the Payroll Canada. I was wondering if the functionality in the Payroll Qiuck Entry could allow the user to insert a row when entering hours. Presently we have the ability to delete a row but not insert a row. If you are making adjustments to an individual employee you can't insert a row you have to do the adjustments at the bottom of the page. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree&...

how do i carry a balance to next row without it continuing down?
i have made a worksheet that adds and subtracts across the row, each row is a month, then the balance in the last colunm jumps down to the next row (month)first column. everything works great but i don't want the balance for the next month continuing down to the each month same for the ending balance. what i want is to have it end each time with just the beginning balance for the coming month, then as i add a percentage rate it will add across the row and put the ending balance in the next row (month) i hope this make sense ...

Lookup Values, etracting Row header and column header.
Hi all, I have a dat matrix having 100 rows and 100 columns. The data is dynamic and keeps changing. 3500 3550 3600 3650 3700 3550 - - - - 3600 - - - - 3650 - - - - 3700 - - - - 3750 - - - - 3800 - 20 - - 3850 - - - - 3900 - - - 15 For eg: the data in row 3800 and column 3600 shows a value of 20. Is there any function by which i can extract any positive values in the data matrix such that it gives a summary in another worksheet: # Row Column Value 1 3800 3600 20 2 3900 3700 15 Note: th...

Moving spreadsheet rows with photos Problems in Excel 2007
I have an inventory worksheet in Excel 2002. There is a photo in one cell in each row that needs to move with the row. I formatted each photo to move and size with cell, and had no problems. Have just had to change to Excel 2007. I can move the row by cut and insert cut cells, and the photo moves with it. BUT the problem comes with the rows above the cut cells - the photos move down into the blank row left by the cut row when moving to another sheet- so the photos left are not with their original rows and descriptions. I have looked at all the options that I can find (steep learning...

Cannot Insert Object
Hi all I'm having trouble inserting a .msg outlook file into an Excel workbook, can anyone please advise as to why I'm getting this error. Many thanks Badger -- BadgerMK ------------------------------------------------------------------------ BadgerMK's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31406 View this thread: http://www.excelforum.com/showthread.php?threadid=511023 ...

Can't open excel or word documents (says insert sm bus cd?)
I have been running Windows XP for over a year without a problem, but now I can not open any of my Excel or Word or Outlook documents because it says that I need to insert my small business cd. I don't have that cd. This has happened once before and I just used my system restore function and it was fine, but that won't even work this time. HELP!! ~~Angela @ angela27@iglide.net ...

how do you insert an element into an xml document with namespace
perfix? <bac:BACnetDevice APDUTimeout='' ApplicationSoftwareVersion='' FirmwareRevision='' InstanceNumber='3744' MaxAPDULengthAccepted='' ModelName='' NumberOfAPDURetries='' ProtocolConformanceClass='' ProtocolObjectTypesSupported='' ProtocolServicesSupported='' ProtocolVersion='' SegmentationSupported='' VendorIdentifier='' VendorName='' xmlns:bac='http://www.teletrol.com/BACnet'> <bac:BACnetPoints> <bac:baseAnalogInput EventState='0' Insta...

How do I insert a picture within an Excel comment box?
How do I insert a picture within an Excel comment box? There are instructions here: http://www.contextures.com/xlcomments02.html#Picture Roy White wrote: > How do I insert a picture within an Excel comment box? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

GL Account on POP Blank Form
I am running Dynamics 8.0, and I am want the GL account number to show up on each line item. I found the article on CustomerSource telling me how to do it, but I keep getting error messages when trying to run the report. I noticed that the article applies to GP v. 7.0. Does anyone know if the procedure is different for v. 8.0 and where I can find those instructions? We're showing the GL Account on the POP Blank Form in 8.0 and I believe we followed the same article. I don't think there have been any changes. If you'll post the error message I'll try to help. ...

Counting Rows
Hello, I am trying to do the following: 1. Count populated Rows using VB 2. If the # of populated rows is less than 2 post a message box dsiplaying the count 3. If the # of populated rows is greater than 3, continue on with the rest of the macro. Anything you can do to hlep is greatly appreciated. This will look at the last populated cell in the desired row. Sub countrowsincolA() mc = 2 '"a" x = Cells(Rows.Count, mc).End(xlUp).Row If x < 2 Then MsgBox "Only " & x Else 'goon MsgBox "oh boy" End If End Sub -- Don Guillett Microsoft MVP Excel S...

Ignore Blank
Hi to all, I have a range name that might have blank cells. I used it in a "validating data" settings. I hade a sourse=rangeName and also have chose the "list" option. The "Ignore Blank" is selected. When I use this list I can see the Blank cells!! Why this option is not working ???? You misunderstand the purpose of "ignore blanks" Blank Cells in Source List If the source list is a named range that contains blank cells, users may be able to type any entry, without receiving an error message. To turn prevent this: Select the cell that contains a d...