+ Reply to Thread
Results 1 to 8 of 8

Adding a row to the end of a range, where the new row becomes part of the range

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Exeter, New Hampshire
    MS-Off Ver
    Excel 2010
    Posts
    48

    Adding a row to the end of a range, where the new row becomes part of the range

    Hello,

    I have looked high and low for a macro that allows me to end a row to the end of a named range, but then includes that row in the range.

    I have new data to add each month, and I want to be able to automate the process as much as possible. I plan to fill down some data so that it is sequential (for example, 10/2013 becomes 11/2013 in the new row), and add dialog boxes to fill in the rest of the manual data. A macro adding the new row to the range will allow me to refer to that new range.

    I hope this makes sense. I am relatively new to the macro world but aspire to greatness!

    Thank you in advance,
    Pat

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    Better you provide a sample workbook with the data in one sheet and the desired result in another sheet.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    I had to make a couple assumptions with the information provided. Hopefully i guessed correctly.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-07-2013
    Location
    Exeter, New Hampshire
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    Thanks for a quick response. Here is an example. I would like "Old Range" to look like "New Range" after running the macro.

    "Old Range"
    Period Year User Input 1 User Input 2
    1 2010 1.5 4
    2 2011 8.23 88
    3 2012 3.37 5
    4 2013 7.56 6

    "New Range"
    Period Year User Input 1 User Input 2
    1 2010 1.5 4
    2 2011 8.23 88
    3 2012 3.37 5
    4 2013 7.56 6
    5 2014

    I've attached as well.

    Thanks,
    Pat
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    Based upon new information:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-07-2013
    Location
    Exeter, New Hampshire
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    Stnkynts,

    Brilliant. Thank you very much.

    I don't know if it's ok to do this, since you've now solved my initial question, but my follow-up question is: rather than enter in "whatever" and "whatever2", is there any way to fill down from the previous row? So, in this example, the period and the date (Columns A and B) would fill automatically. An additional caveat here is that filling from the last row only would give period "4" and year "2013" repeated over and over again; is there any way for the macro to take this into account?

    If it's not appropriate to add the follow-up question, I'd be happy to start a new thread.

    Thank you again.
    Pat

  7. #7
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    Sorry for the delay. Is the period always increasing by a value of 1 and is the year always increasing by a value of 1 year? If so then try:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-07-2013
    Location
    Exeter, New Hampshire
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Adding a row to the end of a range, where the new row becomes part of the range

    That will do it! Thank you again for your help.

+ 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. Part of the range formula
    By stas_p in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-19-2013, 02:44 PM
  2. Sumproduct only part of given range
    By rustam.takutdinov in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-23-2013, 04:07 AM
  3. Formatting a range and Adding a formula to convert the range.
    By Technodruid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2010, 02:22 PM
  4. Sumif with a range (part II)
    By Metolius Dad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 01:15 PM
  5. Painting Range - extend the range on the top part
    By Shrikant in forum Excel General
    Replies: 4
    Last Post: 09-01-2005, 07:05 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