We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Excel Everlasting list

I would like to create a list which expands as fields are filled in. I have a list which has a total at the end and want the spreadsheet to still be able to calculate the list total. But as one field is filled it automatially expands to lsit another field underneath.

Does this make sense lol?
Help me to help you :santa2:

Comments

  • Stompa
    Stompa Posts: 8,390 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Does this make sense lol?
    Not entirely! Had you considered putting the SUM at the top of the list rather than the bottom?
    Stompa
  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    You can use the offset and count formulas to create a dynamic range. If your list is in column A, creating a named range with =OFFSET(Sheet1!$A$1,,,COUNT(Sheet1!$A:$A),) (use counta if text) will make the range expand to match the size of the list. Sheet1!$A$1 is the starting point of the list.
  • CashSheet.jpg

    For example I want to fill in 'B' and if there are more than 5 refunds I would like Excel Spreadsheet to enter another box below the last.
    I would then like the total field below to automatically recalculate and includ any additional boxes it creates.

    'A' will then need to re-adjust and copied the sum of the field.

    I don't quite know if this is what Philco meant?

    Cheers
    Help me to help you :santa2:
  • Looks great! But I can't get it to do what I want still, I changed Row to 35 which is the one just above Total, I also changed the Column to 4 as it is in Column D

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 4 And Target.Row = _
    Cells(Rows.Count, 35).End(xlUp).Row - 1 Then
    Rows(Target.Row + 1).Insert
    End If
    Application.EnableEvents = True
    End Sub

    Sub fixifbroke()
    Application.EnableEvents = True
    End Sub
    Help me to help you :santa2:
  • Stompa
    Stompa Posts: 8,390 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    It's a little difficult to tell why it's not working for you, but FWIW the original code appears to work for me.
    Stompa
  • hmm.. been playing around with it but had little success so far... any other ideas?

    (also cheers for trying :) )
    Help me to help you :santa2:
  • Stompa
    Stompa Posts: 8,390 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    At a guess I'd say it is working but perhaps not on the row you were expecting. It looks as though the code needs to be adjusted to take into account the number of rows containing data below the row you want to move down. From your screenshot it looks as if you have other cells containing data below your 'Total' cell. The 4th post in that thread may help?
    Stompa
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.2K Reduce Debt & Boost Income
  • 455.1K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 603K Mortgages, Homes & Bills
  • 178.1K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.