I'm trying to work out how I can get a cell to pick up the last non-zero value in that row. I can move the data manually but would appreciate any ideas on how to do it more efficiently.
Any thoughts much appreciated!
I'm trying to work out how I can get a cell to pick up the last non-zero value in that row. I can move the data manually but would appreciate any ideas on how to do it more efficiently.
Any thoughts much appreciated!
Perhaps
=LOOKUP(2,1/(1:1<>0),1:1)
Not clear though if the values are sorted at all - if so things become simpler.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I've never really used LOOKUP before; I've made it do what I want to do but I don't really understand how it works.
=LOOKUP(2,1/(G6:AD6<>0),G6:AD6)
returns the value I'm looking for. There will be data entered in each of those columns on a monthly basis, and that now picks up the last value in the row.
It doesn't need to be ordered or formatted, just moved into that column and I can reference it from other sheets.
What does the 2,1 part of the formula do?
There's no 2,1 part of the formula.
First step, 2 is looking for value 2 in a range.
Second step: 1/something can never be 2 (you could put any number greater than 1 in First step) for numbers greater than 1.
Therefore, formula look until end and return last value since it don't find 2.
Never use Merged Cells in Excel
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks