How do I insert a row of blank cells?

I need to know how to insert a row of blank cells every other row in the 
columns from F to I ONLY!!!  I currently have just a straight set of data in 
those columns like data-data-data-data-data-data.  I need to have it 
alternate data-blankrow-data-blankrow-data-blankrow- as I go down from row to 
row.  I need to do this for about 1000 rows so I need a quick way to do it if 
there is one.  HELP!!!

Looks like this:

Data
Data
Data
Data

I want this:

Data

Data

Data

Data

Thanks.

Chris
0
10/29/2004 5:48:11 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
516 Views

Similar Articles

[PageSpeed] 11

-open the VB editor
-double click the sheet of interest
-View from the menu--> Code
-Paste the below code, then run the 'InsertBlankRows' macro

* this assumes that all rows have data, it will stop if it finds a
blank value
(it uses F to I Columns) 

Sub InsertBlankRows()
Dim Interval As Long
Dim Counter As Long
Interval = 2:StartRow = 2:Counter = StartRow
Do While Cells(Counter, 6).Value <> ""
Range(Cells(Counter, 6), Cells(Counter, 9)).Select
Selection.Insert Shift:=xlDown
Counter = Counter + 2
Loop
End Sub


-- 
crispbd
------------------------------------------------------------------------
crispbd's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=10880
View this thread: http://www.excelforum.com/showthread.php?threadid=273678

0
10/29/2004 7:08:56 PM
Reply:

Similar Artilces:

Cursor Keys does not change cell focus
I use passwords to protect worksheets (leaving cells unprotected in which data is to be entered) and so I do not forget the password, I write the password in the last row of the last column (IV65536) then I protect the sheet. When the sheet is protected I then cannot use the cusor keys or rather the up/down/left/right arrow keys do not move the cell focus to the next cell of the unprotected cells. I can mouse click on the cell but that is a pain and I should be able to use the cursor keys. If I then delete the data in the last column/row I am still stuck with the problem. Is this an undocum...

Pre-formatting Cells to look blank until data is entered
Using Microsoft Excel 2003 Is it possible to pre-set formatting on cells so that the formatting on those cells stay blank until data is entered, then the pre-set formatting is autmatically applied? For Example: Instead of having the entire sheet with Border Formatting, and having pages with blank data w/formatting, the pages will look blank until data is entered, then the formatting will be applied. Does that make sense? Troy Troy, For example, you could use an event: this will copy the format of the cell above after the entry has been made, for any single cell entry in columns A or B...

Calculate Difference in Rows
How do I calculate the difference between two numbers in different rows? "Glenna" wrote:subed going to jail > How do I calculate the difference between two numbers in different rows? "Glenna" <Glenna@discussions.microsoft.com> wrote in message news:B551C7E2-392A-4E7B-BAA8-5E3189FBEF8F@microsoft.com... > How do I calculate the difference between two numbers in different rows? In a report, this may help: http://support.microsoft.com/kb/290136 -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp...

Moving cell values
Is it possible to - 1. Re-arrange values in a single cell into numerical order within the cell? - to explain - cell A1 looks like 25 4 11 29 16 - how do I make it look like - 4 11 16 25 29 2. Copy each of a number of values in a single cell to it's own cell? - to explain, using the above example - cell B1 would end up with the value 25, B2 would have 4, B3 would have 11, and so on I'm sure this can be done through a VB scripts and thus a macros, but I don't have quite enough knowledge to write them On Sat, 25 Jun 2011 19:40:23 +0100, "wulfit" <wulfit@btintern...

Shading in cells is not printing....HELP!
Shading is applied and showing on screen...have marked print gridlines...still can't get shading to print in spreadsheet. In Page Setup have a look to see if you have "black and white" or "draft quality" checkmarked. Uncheck both of those. Gord Dibben MS Excel MVP On Wed, 12 May 2010 05:25:01 -0700, aquams <aquams@discussions.microsoft.com> wrote: >Shading is applied and showing on screen...have marked print >gridlines...still can't get shading to print in spreadsheet. ...

I do a calculation in a cell, but it calcs as zero!
I am doing a calculation (Cell f7/22) - $300,000.00 divided by 22 the result shows as Zero! Perhaps the $300K isn't being seen as a number. Try "Data isn't recognized..." http://www.officearticles.com/excel/data_cleanup_tips_for_microsoft_excel.htm ************ Anne Troy www.OfficeArticles.com "G4" <G4@discussions.microsoft.com> wrote in message news:F6E95F42-3A33-4691-89D3-5374DCC9A0F3@microsoft.com... >I am doing a calculation (Cell f7/22) - $300,000.00 divided by 22 > the result shows as Zero! ...

Clear the content of a cell using VBA
I am trying to write a mini VB marco that clears the entire content of a cell upon a certain condition from other cell. Pls help on the coding. with activesheet if .range("a1").value > 5 then .range("d1").clearcontents end if end with But it sounds like you may want to run it automatically: Try this in a test worksheet. rightclick on the sheet tab and select view code. paste this in the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Intersect(Target, Me.Range(&...

I want to insert a figure/diagram into my word document
I want to insert into a word document so figures and graphs so that the final document has these figures embedded so that it is near the relevant text. Please explain what difficulty you are having in doing this. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Clydesdale" <Clydesdale@discussions.microsoft.com> wrote in message news:CB4C60A5-EA17-4F43-8697-75F9D60A322E@microsoft.com... >I want to insert into a word document so figures and graphs so that the >final > document has these figures ...

Inserting Clip Art into a cell in Excel
When you insert a picture or clip art into a cell, is there a way that it can be associated specifically with that cell? I am using excel for a glossary, where some of the terms will have visual references. I would like to be sure that should the list need to be sorted after all the pictures have been added they will sort with the rest of the document. Does anyone know about this? ...

Conditional Formatting
Situation: Let's say you have a list in Excel. Within that list, there is a column to which you have applied conditional formatting. However, for some reason, you have applied 2 different types of conditional formatting in the same column. Perhaps the list contains 2 different classes of employees, and you want to distinguish achievements with conditional formatting that not only sets standards higher for one group, but makes the formatting different as well. At some point, you might want to sort that list to see who is doing well. However, when you sort, the formatting remains ...

Pics in a cell
(office 2000 version) In which way can I paste Pics in a cell, I've already tried to copy, paste/ but they are not locked in the Cell. Even have I tried to Lock the cell, When I give the (cell) colums a search function, it trows all pics on each other . mine search function doesn't work. Who can help me? Milanvanbree@brabantia.com Cells can contain either values or formulas. Pictures and other objects exist on the drawing layer in front of the cells. Once you have the picture sized in front of a cell, you might try Format/Picture/Properties/Move and size with cells to keep the p...

IF COUNTIF & COUNTA on Filtered Visible Cells #9
Hi Aladin, Thanks for reply. However, the formula when entered on a sampl section in Column "T" only gives me a sequential count starting fro eg: 0-40 down Column "T". It is not returning the expected result based on the text in Column "V" that I've enclosed in quotation mark within curly brackets for the array element: {"Executive", "Trainees" "Manager", "Admin"}. Further assistance appreciated. Thanks Tin� Aladin Akyurek Wrote: > Tin�, > Just picking out the above filtered out question: The answer is yes ...

Counting cells #3
Hi, I had this before, but it didn't work weel! I may have not made it clear. Range C5:C29 containes either letter C or letter M. Range D5:D29 containes either letter M or letter F line 5 C F line 6 C M line 7 M M ........... In cell D34 I want to count the number of occurance of the combination of C and M. The array formula =COUNTIF(C5:C29,"C") counts the value of colomn C. What adjustment do I need to do to include the values in colomn D? I tried this: =COUNTIF(C5:C29,"C"), (D5:D29,"M") but had an error Khalil Try one of these: =C...

Protect cells from Move
I have a workbook where some cells are protected and others are unprotected. Sometimes other users move data in unprotected cells, which messes up formulaes elsewhere in the workbook. I want users to be able to enter, edit and copy data, but not move it. Does anyone know if (1) this sort of protection can be set up through the Tools Protection menu, and if (b) I can use a VBA macro to set up this sort of protection whenever the worksheet is activated? Richard ...

make the cell hyperlink to any name within it
is it possible to make the hyperlink relevent to the text within a cell. i.e if the cell said paul it would email to pauls email address or if the same cell said mark it would email to marks email address and so on. any ideas regards Hoyt Create a table with two columns, column A would be a name, Paul etc, column B would contain the equivalent email address from column A Select the range of data entered then choose Insert Menu and Name and enter a name for this range. Then use Data Sort (this function wont work unless the data is sorted into order). Highlight the cell you want say C2 ...

HELP! Split cell contents to new rows
I know how to split cell contents to columns, but how do you tell excel to take the cell contents and insert into new rows. Each name is separated by a comma and I need each name to appear in its own row beneath that cell. PLEASE HELP! Copy, paste special-transpose (now in columns). Data - Text to columns. Copy, paste special- transpose back to rows. -- Best Regards, Luke M "nyarce" <nyarce@discussions.microsoft.com> wrote in message news:E9E6CDF2-7A05-4337-B0DD-C88FCFF617B4@microsoft.com... >I know how to split cell contents to columns, but how do yo...

How do I insert footnotes into various cells inExcel 2000 spreads.
I'm trying to insert footnotes into various cells in an Excel 2000 spreadsheet. I'd like to put a numeric character in a particular cell, which would be a pointer to the footnote asociated with that cell. Does anybody know how to do this? Excel doesn't really do this well. Maybe you could put a shape (triangle) in a corner and add a number to the shape??? blakslax wrote: > > I'm trying to insert footnotes into various cells in an Excel 2000 > spreadsheet. I'd like to put a numeric character in a particular cell, which > would be a pointer to the footno...

excel 2003 allowed addition of cell color anywhere on the page?
self explanatory, cell color was moveable from location to location on the page. Excel 2010, can't find option??? Not really self explanatory. What do you mean? capnken;596635 Wrote: > self explanatory, cell color was moveable from location to location on > the > page. > Excel 2010, can't find option??? -- teylyn Teylyn -- 'teylyn.posterous.com' (http://teylyn.posterous.com) ------------------------------------------------------------------------ teylyn's Profile: 983 View this thread: http://www.thecodecage.com/forumz/showthread.ph...

How to insert functional buttons?
I need to insert 2 buttons onto an excel spread sheet with 2 different funtions, 1 to copy information in required cells and another to clear the required cells? Which part of that do you need? If all, explain what copy information entails. -- HTH RP (remove nothere from the email address if mailing direct) "hong kong stewey" <hong kong stewey@discussions.microsoft.com> wrote in message news:442AA0E8-F294-45EE-BA9A-A035F16E96BF@microsoft.com... > I need to insert 2 buttons onto an excel spread sheet with 2 different > funtions, 1 to copy information in required c...

Excel cell update slowly
I have an excel sheet with 4 sheets; first sheet using 250 columns and 300 rows; around 40 columns have simple formula's, in which 20 columns have formula's refering to other sheet. second sheet has 100 columns with 300 rows; 16 columns have vlookup formulas. When user modifies the cell in first sheet, its taking longer time to update the modified cell. On every cell change, we see the calculation running from 0 to 100%. The cell changes are updated slowly. The Calculation is set to automatic. How should we fix this issue? If your vlookup formulas are using all ...

I can I select cells in a template and link it to a database?
Hi not really sure what you're trying to achieve. Maybe give some more details (and please put them in the body of your message) -- Regards Frank Kabel Frankfurt, Germany "group3" <group3@discussions.microsoft.com> schrieb im Newsbeitrag news:F71B2BF1-8E68-4C54-A528-AA5A53BCFD08@microsoft.com... > ...

Table cell background not showing
I made a html-page with microsoft Frontpage to use as an Outlook template. I saved it in Outlook as an .oft-file and looks good when I compose a new message. However, the receiver of the message will not see the background I have in one of the table cells. I don't know if this has anything to do with this problem but I discovered that you cannot have a background in an MS Word table cell. Any help will be appreciated. >-----Original Message----- >I made a html-page with microsoft Frontpage to use as an Outlook >template. I saved it in Outlook as an .oft-file and looks good when ...

Formatting in Cell
How do I put a hard return in a cell. Hi ALT+ENTER -- Regards Frank Kabel Frankfurt, Germany "GC" <GC@discussions.microsoft.com> schrieb im Newsbeitrag news:3B133896-C4A4-40A9-92B4-F9188DA74C85@microsoft.com... > How do I put a hard return in a cell. Alt + enter will give you a new line in the same cell Regards, Peo Sjoblom "GC" wrote: > How do I put a hard return in a cell. ...

Concatenate cells in Pocket Excel
Hello, I have a PDA, and I'm trying to merge, or concatenate, cells in Pocket Excel. Unfortunately there is no "concatenate" function, nor am I able to use "&" as in the desktop version of Excel. Any ideas of how to get around this? :confused: Many thanks!! -- jrd05719 ------------------------------------------------------------------------ jrd05719's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24377 View this thread: http://www.excelforum.com/showthread.php?threadid=379669 ...

Testing for a Cell within a range
I an using a "Worksheet_Change" event. I want to test is "Target" is within a range of Cells. My range is K7:P7. I tried: If (Target.Address(False, False) >= Range("K7").Address(False, False) _ And Target.Address(False, False) <= Range("P7").Address(False, False)) When I click on a Cell within, K7 and P7, it get a true response. Good. But when I click on "M8", I also get a true response, Not good. What am I doing wrong? Thank you... IF Not Intersect(Target, Range("K7:P7") ) Is Nothing Then ...