VBA find blank row

Tulsa19

New Member
Joined
Jun 13, 2017
Messages
3
I'm a newbie when it comes to VBA, so any help is appreciated!

If I have set of data in Excel of lets say 500 rows and rows 50, 100, and 300 are blank. Is there a way with a macro to find and select the first blank row in the data set and insert an additional blank row there? Additionally is it possible to loop through to the next blank row and do the same, and so on.

Any help would be greatly appreciated.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,462
Office Version
365, 2010
Platform
Windows, Mobile
Additionally is it possible to loop through to the next blank row and do the same, and so on.
No need to loop if the cells are truly blank, based on column A...

Code:
Sub insRw()
 Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Insert
End Sub
 

Forum statistics

Threads
1,081,617
Messages
5,360,044
Members
400,565
Latest member
Tommy O

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top