+ Reply to Thread
Results 1 to 20 of 20

Insert Line Every Other Row

  1. #1
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Smile Insert Line Every Other Row

    Hello,

    I was wondering if there is a quick and easy way to insert a row in between every line item that I have, so that it is on every other row. Right now, I have formulas down 50 rows, and would like to have a (different from the existing, but same and consistent content) line every other so that it is alternating.

    I hope that is clear. Below is an example:

    Currently:
    Content A
    Content A
    Content A

    I would like it to be:
    Content A
    Content B
    Content A
    Content B
    Content A
    Content B


    I appreciate it!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: Insert Line Every Other Row

    Something like this, maybe...
    =IF(ISODD(ROW()),$C$1,$D$1)

    where C1 and D1 contain the texts that you wish to alternate...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Insert Line Every Other Row

    Another solution would be to insert the new data undernath the old data, then number them as follows. Once you have entered the first couple of numbers you can drag down and it will continue the pattern. Then sort the numbers ascending and delete the column.

    A 1
    A 3
    A 5
    A 7
    B 2
    B 4
    B 6
    B 8

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,309

    Re: Insert Line Every Other Row

    Here another one
    Enter in an empty column each row (1-10) a number from 1 to 10 and row 11 to 20 also 1 to 10 (row 11 to 20 are empty)
    Then sort everything on that column and there is a empty row after each row
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Hello Glenn,

    Thank you - what do I put in the parenthesis after ROW?

    I am wanting to repeat in an alternating fashion down Column B, not across row C,D,E... so If I want it to go down my B column, would I enter in the data I want for B1, B2, then in B3 enter in the "IF(ISODD ..." formula then drag it down?
    Last edited by rosethorn5; 08-03-2015 at 05:14 PM.

  6. #6
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    I don't know how to delete this
    Last edited by rosethorn5; 08-03-2015 at 05:15 PM.

  7. #7
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    I don't know how to delete this
    Last edited by rosethorn5; 08-03-2015 at 05:15 PM.

  8. #8
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Insert Line Every Other Row

    This site has an interesting method as well.
    http://www.pcmag.com/article2/0,2817,1785247,00.asp
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Insert Line Every Other Row

    This might work for you:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    MOD(ROW(),2)=1 when filled down a column produces 1 and 0 alternating down the column starting with 1 if starting in the first row.

    If you change to MOD(ROW(),2)=0 when filled down a column produces 0 and 1 starting with 0 if starting in the first row.

    If the formula starts on an even row, the above MOD formulae are reversed.

    If the values are in one column like column A this will work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 08-03-2015 at 06:11 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  10. #10
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Thank you all - my problem is that the information that I want to alternate down a column include formulas, which contain specific cells in that corresponding row. When I go to enter something in those cells that correspond to those formulas, it repeats them in every single alternating cell down that column. I need to repeat these formulas in an alternating fashion down this column but all be independent from each other. Is this possible? Or do I have to enter the formulas alternating every row, then manually select the corresponding cells for every single line?

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Insert Line Every Other Row

    This will combine the contents of columns A and B into a single column alternating between column A and column B. The construction of the formulae in the columns will determine if they still work or not. This starts in row 1.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If the data starts in row 2 use this and the combined column will start the combined values in row 3.The firs value will be a 0...delete it.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: Insert Line Every Other Row

    What are the two formulae that you want to incorpoate? In which row should each one begin?

  13. #13
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Insert Line Every Other Row

    rosethorn5, will you please attach sample excel with with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  14. #14
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Below are the two formulas which I would like to alternate every other row down one column. They need to be independent from each other.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Below are two other formulas in which I need to alternate every other row down one column:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: Insert Line Every Other Row

    Put this in A5 or any other column, row 5, and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: Insert Line Every Other Row

    And in B3, or any other column, row 3:

    =IF(ISODD(ROW()),ROUNDUP(O3*2.3,0),ROUNDUP(O3*2,0))

    BtW, you don't put anything between the () of row(). It's just looking at the row and dertermining if its and odd-numbered row or an even-numbered row. The IF function makes it return one formula if its an odd-numbered row and another formula if its an even numbered row.

  17. #17
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Quote Originally Posted by Glenn Kennedy View Post
    Put this in A5 or any other column, row 5, and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    YES!! This is perfect. Thank you SO MUCH!!!

  18. #18
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Glenn - why does the first, longer formula start in row 5, and the second, shorter formula start in row 3? Both of these formulas correspond with each other.

    Row 1 & 2 are labels for my chart, so I start my data in row 3. For each of the two formulas (Concatenate & Roundup), do I need to enter the formulas in row 3 and 4, then the "IF(ISODD(ROW()), ...." formula in row 5? or Can I start in row 3?

    Thank you!!

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: Insert Line Every Other Row

    You're welcome and thanks for the Reputation.

  20. #20
    Registered User
    Join Date
    08-03-2015
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Insert Line Every Other Row

    Nevermind - I figured it out. Thanks again so much Glenn!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Where more than 1 line exists in excel transfer - insert line in word report bookmark
    By PippiLaRue in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2013, 05:04 AM
  2. [SOLVED] VBA - Help on insert line
    By 5h1l in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2012, 01:49 PM
  3. Insert a line at zero value in a line graph
    By bobby_712 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 07-05-2012, 05:21 PM
  4. Insert Line Every Other Row w/Multiple Formulas based on Line Above
    By xyshel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2011, 11:09 AM
  5. Insert Line
    By kirbyaggie2012 in forum Excel General
    Replies: 2
    Last Post: 02-23-2009, 07:49 AM
  6. Insert New Line
    By Clare in forum Excel General
    Replies: 4
    Last Post: 07-06-2006, 10:45 AM
  7. Replies: 8
    Last Post: 11-30-2005, 09:55 AM
  8. Insert each line in a new row
    By delphi in forum Excel General
    Replies: 1
    Last Post: 05-31-2005, 10:14 AM

Tags for this Thread

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