+ Reply to Thread
Results 1 to 4 of 4

Insert blank row above populated cell

  1. #1
    Bevy
    Guest

    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. #2
    Don Guillett
    Guest

    Re: 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
    [email protected]
    "Bevy" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Bevy
    Guest

    Re: 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
    > [email protected]
    > "Bevy" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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
    > >



  4. #4
    Don Guillett
    Guest

    Re: Insert blank row above populated cell

    Or what was my suggestion a couple of days ago

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Bevy" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >> [email protected]
    >> "Bevy" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1