Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Excel Question

  • 12-01-2005 07:06PM
    #1
    Registered Users, Registered Users 2 Posts: 4,666 ✭✭✭


    Ok this seems like it should be simple to do but I can't get it to work!

    I have an excel spreadsheet. It has a column of numbers. I want to get the last number in that column and use that number in a different cell. The column is not a fixed length. So how do I do it?

    I can get the index of the last element using COUNT(C2: C100) which returns the number of columns that have values in them. As there is always a value in this column I use this number and add 1. Thus giving me the column index. But how do I use that value (assume it's in a cell X1) in the reference to the other cell. Something like '=C(X1)' (Where X1 is say 17 and '=C17' would work) but obviously that doesn't work .


Comments

  • Registered Users, Registered Users 2 Posts: 95 ✭✭sidekick


    Perhaps a wild shot but have you tried using the INDIRECT function?
    Returns the reference specified by a text string. References are immediately evaluated to display their contents. Use INDIRECT when you want to change the reference to a cell within a formula without changing the formula itself.


  • Registered Users, Registered Users 2 Posts: 4,666 ✭✭✭Imposter


    Thank you. That does the trick nicely.


Advertisement