Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert blank row above populated cell
Hi there, I have a column mostly consisting of blank cells. What I
need is some vba that finds any populated cells and then inserts a new row above it. Is the best way to do this by using ISTEXT, or NOT (ISBLANK). I'm sure the answer is very simple, but not for me! Any advice would be really appreciated. Thank u, BJ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert blank row above populated cell
try
Sub insertifnotblank() For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1 If Len(Cells(i, "a")) 1 Then Rows(i).Insert Next i End Sub -- Don Guillett SalesAid Software "Bevy" wrote in message oups.com... Hi there, I have a column mostly consisting of blank cells. What I need is some vba that finds any populated cells and then inserts a new row above it. Is the best way to do this by using ISTEXT, or NOT (ISBLANK). I'm sure the answer is very simple, but not for me! Any advice would be really appreciated. Thank u, BJ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert blank row above populated cell
Thanks again Don,
I have just demonstrated to you the extent of my ignorance! I am going to demand that I go on a course, or that they buy me a very good book! :) Don Guillett wrote: try Sub insertifnotblank() For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1 If Len(Cells(i, "a")) 1 Then Rows(i).Insert Next i End Sub -- Don Guillett SalesAid Software "Bevy" wrote in message oups.com... Hi there, I have a column mostly consisting of blank cells. What I need is some vba that finds any populated cells and then inserts a new row above it. Is the best way to do this by using ISTEXT, or NOT (ISBLANK). I'm sure the answer is very simple, but not for me! Any advice would be really appreciated. Thank u, BJ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding cells but leaving blank if not populated | Excel Worksheet Functions | |||
How do I insert a work sheet populated with data into another? | Excel Worksheet Functions | |||
First populated cell in row array/ Last populated cell in row arra | Excel Worksheet Functions | |||
formula for a cell which is blank returns populated cell | Excel Discussion (Misc queries) | |||
Auto insert Date & Time when another cell is populated | Excel Discussion (Misc queries) |