Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TB TB is offline
external usenet poster
 
Posts: 26
Default VB: How do I find next blank row then add another blank row

I have a fairly large spreadsheet wherein there are multiple rows of related
data separated by single blank rows. I need VB code that will find each of
the blank rows and then add another blank row adjacent to it so that I will
have a total of 2 blank rows between each set of related data. Any
suggestions would be greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default VB: How do I find next blank row then add another blank row

Hi,
Assuming by blank you mean empty (does not contains empty string "").
Can such blank rows be located by only looking if the cell is blank in a
particular column? If so, say it is column A. then for A1:A100:
Dim rg As Range
Set rg = Range("A1:A100").SpecialCells(xlCellTypeBlanks)
rg.EntireRow.Insert shift:=xlDown

--
Regards,
Sébastien


"TB" wrote:

I have a fairly large spreadsheet wherein there are multiple rows of related
data separated by single blank rows. I need VB code that will find each of
the blank rows and then add another blank row adjacent to it so that I will
have a total of 2 blank rows between each set of related data. Any
suggestions would be greatly appreciated!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
Excel 2002: Return blank when VLOOKUP on blank cells Mr. Low Excel Discussion (Misc queries) 2 June 4th 09 05:12 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Copying and pasting a worksheet to a blank and removing blank rows Bob Reynolds[_3_] Excel Programming 0 June 24th 04 02:55 PM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"