+ Reply to Thread
Results 1 to 8 of 8

Add rows based on adjacent row value

  1. #1
    Registered User
    Join Date
    06-29-2022
    Location
    NY
    MS-Off Ver
    365
    Posts
    5

    Add rows based on adjacent row value

    Hello,

    Is there a way to get the bottom table, which has aggregate values for each item from the top table, which has multiple values for each item. The new table could be in the same sheet, or a new sheet or in a new Excel file.

    Screenshot.jpg

    Thank you,
    Ved

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: Add rows based on adjacent row value

    you could insert 5 rows in the top, then move the summary to the top. In other sheets, make a formula pulling those values (they'll be in the 1st 3 rows of original sheet.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Add rows based on adjacent row value

    Hello Ved. Welcome to the forum.

    Try this formula in B11 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To get this:


    A
    B
    1
    Names
    Cost
    2
    Apple - part 1
    5
    3
    Apple - part 2
    3
    4
    Banana - part 1
    2
    5
    Banana - part 2
    4
    6
    Banana - part 3
    7
    7
    8
    9
    10
    Names
    Cost
    11
    Apple
    8
    12
    Banana
    13
    Dave

  4. #4
    Registered User
    Join Date
    06-29-2022
    Location
    NY
    MS-Off Ver
    365
    Posts
    5

    Re: Add rows based on adjacent row value

    Hi Dave,

    This works, thank you so much!
    Is it possible to get the item names A11:A12 automatically from the original cells A2:A6? I had to type the names in A11:A12 and then run your formula.

    Ved

  5. #5
    Registered User
    Join Date
    06-29-2022
    Location
    NY
    MS-Off Ver
    365
    Posts
    5

    Re: Add rows based on adjacent row value

    Hello, I did not understand your solution. Could you please elaborate a bit?

    Thanks,
    Ved

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Add rows based on adjacent row value

    Quote Originally Posted by vedsharma View Post
    Hi Dave,

    This works, thank you so much!
    Is it possible to get the item names A11:A12 automatically from the original cells A2:A6? I had to type the names in A11:A12 and then run your formula.

    Ved
    Yes. Try in A11 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-29-2022
    Location
    NY
    MS-Off Ver
    365
    Posts
    5

    Re: Add rows based on adjacent row value

    Quote Originally Posted by FlameRetired View Post
    Yes. Try in A11 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you so much, this works!

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Add rows based on adjacent row value

    You are welcome. Thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. code to insert non adjacent rows based on cell value
    By BEEROG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2021, 11:32 AM
  2. max value in a range of rows based on adjacent cell being equal
    By cp41 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2018, 08:03 AM
  3. Product for Rows based on Attributes in Adjacent Column
    By shouwiz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2018, 05:11 PM
  4. Auto-adjust # of rows in a column that have a formula based on adjacent column data?
    By Norcal1 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 05-31-2018, 02:03 PM
  5. Insert rows based on count and fill rows with adjacent values
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-19-2015, 02:57 PM
  6. [SOLVED] macro to autofil formula based on number of rows on adjacent column
    By kramtelbuab in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2013, 08:28 PM
  7. Replies: 2
    Last Post: 03-23-2012, 02:52 PM

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