+ Reply to Thread
Results 1 to 9 of 9

Difficult Question

  1. #1
    bodhisatvaofboogie
    Guest

    Difficult Question

    Okay, I'm trying to do something very strange, but I have to find a way to
    get all the data in an orderly fashion. I want to do the following:

    Seek the blank rows and select each cell one up from the blanks. For each
    selection(essentially the last row of each set of data separated by a blank
    row),

    IF (Cell = 2) Then
    Insert 28 rows

    IF (Cell = 3) Then
    Insert 27 rows

    IF (Cell = 4) Then
    Insert 26 rows

    ETC.ETC....

    That would make each grouping of data have the exact same amount of rows,
    which is what I NEED to continue with my project. Need more clarification,
    please ask. THANKS!!!!!!

  2. #2
    Don Guillett
    Guest

    Re: Difficult Question

    something like

    Sub insertrowssize()
    ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    End Sub
    --
    Don Guillett
    SalesAid Software
    [email protected]
    "bodhisatvaofboogie" <[email protected]> wrote in
    message news:[email protected]...
    > Okay, I'm trying to do something very strange, but I have to find a way to
    > get all the data in an orderly fashion. I want to do the following:
    >
    > Seek the blank rows and select each cell one up from the blanks. For each
    > selection(essentially the last row of each set of data separated by a
    > blank
    > row),
    >
    > IF (Cell = 2) Then
    > Insert 28 rows
    >
    > IF (Cell = 3) Then
    > Insert 27 rows
    >
    > IF (Cell = 4) Then
    > Insert 26 rows
    >
    > ETC.ETC....
    >
    > That would make each grouping of data have the exact same amount of rows,
    > which is what I NEED to continue with my project. Need more
    > clarification,
    > please ask. THANKS!!!!!!




  3. #3
    bodhisatvaofboogie
    Guest

    Re: Difficult Question

    How do I get it to select the cells right above the blank ones? Thanks!!!

    "Don Guillett" wrote:

    > something like
    >
    > Sub insertrowssize()
    > ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    > End Sub
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "bodhisatvaofboogie" <[email protected]> wrote in
    > message news:[email protected]...
    > > Okay, I'm trying to do something very strange, but I have to find a way to
    > > get all the data in an orderly fashion. I want to do the following:
    > >
    > > Seek the blank rows and select each cell one up from the blanks. For each
    > > selection(essentially the last row of each set of data separated by a
    > > blank
    > > row),
    > >
    > > IF (Cell = 2) Then
    > > Insert 28 rows
    > >
    > > IF (Cell = 3) Then
    > > Insert 27 rows
    > >
    > > IF (Cell = 4) Then
    > > Insert 26 rows
    > >
    > > ETC.ETC....
    > >
    > > That would make each grouping of data have the exact same amount of rows,
    > > which is what I NEED to continue with my project. Need more
    > > clarification,
    > > please ask. THANKS!!!!!!

    >
    >
    >


  4. #4
    Don Guillett
    Guest

    Re: Difficult Question

    IF?? I understand your question

    ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
    --
    Don Guillett
    SalesAid Software
    [email protected]
    "bodhisatvaofboogie" <[email protected]> wrote in
    message news:[email protected]...
    > How do I get it to select the cells right above the blank ones? Thanks!!!
    >
    > "Don Guillett" wrote:
    >
    >> something like
    >>
    >> Sub insertrowssize()
    >> ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    >> End Sub
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> [email protected]
    >> "bodhisatvaofboogie" <[email protected]> wrote
    >> in
    >> message news:[email protected]...
    >> > Okay, I'm trying to do something very strange, but I have to find a way
    >> > to
    >> > get all the data in an orderly fashion. I want to do the following:
    >> >
    >> > Seek the blank rows and select each cell one up from the blanks. For
    >> > each
    >> > selection(essentially the last row of each set of data separated by a
    >> > blank
    >> > row),
    >> >
    >> > IF (Cell = 2) Then
    >> > Insert 28 rows
    >> >
    >> > IF (Cell = 3) Then
    >> > Insert 27 rows
    >> >
    >> > IF (Cell = 4) Then
    >> > Insert 26 rows
    >> >
    >> > ETC.ETC....
    >> >
    >> > That would make each grouping of data have the exact same amount of
    >> > rows,
    >> > which is what I NEED to continue with my project. Need more
    >> > clarification,
    >> > please ask. THANKS!!!!!!

    >>
    >>
    >>




  5. #5
    bodhisatvaofboogie
    Guest

    Re: Difficult Question

    How do I get it to select the cells right above the blank ones? Thanks!!!

    "Don Guillett" wrote:

    > something like
    >
    > Sub insertrowssize()
    > ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    > End Sub
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "bodhisatvaofboogie" <[email protected]> wrote in
    > message news:[email protected]...
    > > Okay, I'm trying to do something very strange, but I have to find a way to
    > > get all the data in an orderly fashion. I want to do the following:
    > >
    > > Seek the blank rows and select each cell one up from the blanks. For each
    > > selection(essentially the last row of each set of data separated by a
    > > blank
    > > row),
    > >
    > > IF (Cell = 2) Then
    > > Insert 28 rows
    > >
    > > IF (Cell = 3) Then
    > > Insert 27 rows
    > >
    > > IF (Cell = 4) Then
    > > Insert 26 rows
    > >
    > > ETC.ETC....
    > >
    > > That would make each grouping of data have the exact same amount of rows,
    > > which is what I NEED to continue with my project. Need more
    > > clarification,
    > > please ask. THANKS!!!!!!

    >
    >
    >


  6. #6
    Don Guillett
    Guest

    Re: Difficult Question

    IF?? I understand your question

    ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
    --
    Don Guillett
    SalesAid Software
    [email protected]
    "bodhisatvaofboogie" <[email protected]> wrote in
    message news:[email protected]...
    > How do I get it to select the cells right above the blank ones? Thanks!!!
    >
    > "Don Guillett" wrote:
    >
    >> something like
    >>
    >> Sub insertrowssize()
    >> ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    >> End Sub
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> [email protected]
    >> "bodhisatvaofboogie" <[email protected]> wrote
    >> in
    >> message news:[email protected]...
    >> > Okay, I'm trying to do something very strange, but I have to find a way
    >> > to
    >> > get all the data in an orderly fashion. I want to do the following:
    >> >
    >> > Seek the blank rows and select each cell one up from the blanks. For
    >> > each
    >> > selection(essentially the last row of each set of data separated by a
    >> > blank
    >> > row),
    >> >
    >> > IF (Cell = 2) Then
    >> > Insert 28 rows
    >> >
    >> > IF (Cell = 3) Then
    >> > Insert 27 rows
    >> >
    >> > IF (Cell = 4) Then
    >> > Insert 26 rows
    >> >
    >> > ETC.ETC....
    >> >
    >> > That would make each grouping of data have the exact same amount of
    >> > rows,
    >> > which is what I NEED to continue with my project. Need more
    >> > clarification,
    >> > please ask. THANKS!!!!!!

    >>
    >>
    >>




  7. #7
    bodhisatvaofboogie
    Guest

    Re: Difficult Question

    Right, that makes sense, but how do I select the blank spaces first? I
    know I'm too demanding.... Thanks!!!

    "Don Guillett" wrote:

    > IF?? I understand your question
    >
    > ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "bodhisatvaofboogie" <[email protected]> wrote in
    > message news:[email protected]...
    > > How do I get it to select the cells right above the blank ones? Thanks!!!
    > >
    > > "Don Guillett" wrote:
    > >
    > >> something like
    > >>
    > >> Sub insertrowssize()
    > >> ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    > >> End Sub
    > >> --
    > >> Don Guillett
    > >> SalesAid Software
    > >> [email protected]
    > >> "bodhisatvaofboogie" <[email protected]> wrote
    > >> in
    > >> message news:[email protected]...
    > >> > Okay, I'm trying to do something very strange, but I have to find a way
    > >> > to
    > >> > get all the data in an orderly fashion. I want to do the following:
    > >> >
    > >> > Seek the blank rows and select each cell one up from the blanks. For
    > >> > each
    > >> > selection(essentially the last row of each set of data separated by a
    > >> > blank
    > >> > row),
    > >> >
    > >> > IF (Cell = 2) Then
    > >> > Insert 28 rows
    > >> >
    > >> > IF (Cell = 3) Then
    > >> > Insert 27 rows
    > >> >
    > >> > IF (Cell = 4) Then
    > >> > Insert 26 rows
    > >> >
    > >> > ETC.ETC....
    > >> >
    > >> > That would make each grouping of data have the exact same amount of
    > >> > rows,
    > >> > which is what I NEED to continue with my project. Need more
    > >> > clarification,
    > >> > please ask. THANKS!!!!!!
    > >>
    > >>
    > >>

    >
    >
    >


  8. #8
    bodhisatvaofboogie
    Guest

    Re: Difficult Question

    Also, how do I input that into an If Statement? I tried to just do

    If (Cell = 16) Then
    ActiveCell.offset(-1).Resize(14 - Range("a1")).EntireRow.Insert
    End If

    But that didn't work

    I know I'm missin somethin...


    "Don Guillett" wrote:

    > IF?? I understand your question
    >
    > ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "bodhisatvaofboogie" <[email protected]> wrote in
    > message news:[email protected]...
    > > How do I get it to select the cells right above the blank ones? Thanks!!!
    > >
    > > "Don Guillett" wrote:
    > >
    > >> something like
    > >>
    > >> Sub insertrowssize()
    > >> ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    > >> End Sub
    > >> --
    > >> Don Guillett
    > >> SalesAid Software
    > >> [email protected]
    > >> "bodhisatvaofboogie" <[email protected]> wrote
    > >> in
    > >> message news:[email protected]...
    > >> > Okay, I'm trying to do something very strange, but I have to find a way
    > >> > to
    > >> > get all the data in an orderly fashion. I want to do the following:
    > >> >
    > >> > Seek the blank rows and select each cell one up from the blanks. For
    > >> > each
    > >> > selection(essentially the last row of each set of data separated by a
    > >> > blank
    > >> > row),
    > >> >
    > >> > IF (Cell = 2) Then
    > >> > Insert 28 rows
    > >> >
    > >> > IF (Cell = 3) Then
    > >> > Insert 27 rows
    > >> >
    > >> > IF (Cell = 4) Then
    > >> > Insert 26 rows
    > >> >
    > >> > ETC.ETC....
    > >> >
    > >> > That would make each grouping of data have the exact same amount of
    > >> > rows,
    > >> > which is what I NEED to continue with my project. Need more
    > >> > clarification,
    > >> > please ask. THANKS!!!!!!
    > >>
    > >>
    > >>

    >
    >
    >


  9. #9
    Don Guillett
    Guest

    Re: Difficult Question


    nextblankrow=range("a1").end(xldown).row+1

    so maybe this would work. not tested

    range("a1").end(xldown).row+1.Resize(30 - Range("a1")).EntireRow.Insert


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "bodhisatvaofboogie" <[email protected]> wrote in
    message news:[email protected]...
    > Also, how do I input that into an If Statement? I tried to just do
    >
    > If (Cell = 16) Then
    > ActiveCell.offset(-1).Resize(14 - Range("a1")).EntireRow.Insert
    > End If
    >
    > But that didn't work
    >
    > I know I'm missin somethin...
    >
    >
    > "Don Guillett" wrote:
    >
    >> IF?? I understand your question
    >>
    >> ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> [email protected]
    >> "bodhisatvaofboogie" <[email protected]> wrote
    >> in
    >> message news:[email protected]...
    >> > How do I get it to select the cells right above the blank ones?
    >> > Thanks!!!
    >> >
    >> > "Don Guillett" wrote:
    >> >
    >> >> something like
    >> >>
    >> >> Sub insertrowssize()
    >> >> ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
    >> >> End Sub
    >> >> --
    >> >> Don Guillett
    >> >> SalesAid Software
    >> >> [email protected]
    >> >> "bodhisatvaofboogie" <[email protected]>
    >> >> wrote
    >> >> in
    >> >> message news:[email protected]...
    >> >> > Okay, I'm trying to do something very strange, but I have to find a
    >> >> > way
    >> >> > to
    >> >> > get all the data in an orderly fashion. I want to do the following:
    >> >> >
    >> >> > Seek the blank rows and select each cell one up from the blanks.
    >> >> > For
    >> >> > each
    >> >> > selection(essentially the last row of each set of data separated by
    >> >> > a
    >> >> > blank
    >> >> > row),
    >> >> >
    >> >> > IF (Cell = 2) Then
    >> >> > Insert 28 rows
    >> >> >
    >> >> > IF (Cell = 3) Then
    >> >> > Insert 27 rows
    >> >> >
    >> >> > IF (Cell = 4) Then
    >> >> > Insert 26 rows
    >> >> >
    >> >> > ETC.ETC....
    >> >> >
    >> >> > That would make each grouping of data have the exact same amount of
    >> >> > rows,
    >> >> > which is what I NEED to continue with my project. Need more
    >> >> > clarification,
    >> >> > please ask. THANKS!!!!!!
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ 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