Hello excel chums,
Had a look around and couldn't see the answer to this, forgive me if it's out there already.
Last week I asked a question about finding the first column with data, and I very promptly had that answered, so thanks to those who did!
My query today is the other part to the question; how do I find the last column with data?
I must admit, I have already figured it out. Thing is, I think the way I've done it is a bit clunky and I'm looking for a more elegant way of doing it.
I've got a count of cells in a row, a column number cell, and an if statement to check if the first cell is a 0 to determine where to start from. Seems like there are too many steps.
The sample file attached has my way of doing it in column J, called last val and highlighted in blue.
Conditions and context: There would never be gaps in data, and either side of the data are 0s rather than blanks (data coming from a getpivotdata formula). First and last val and count columns are to reference a compound annual growth rate function using indirect.
Any help would be gladly appreciated.
Thanks in advance,
Alexis
Had a look around and couldn't see the answer to this, forgive me if it's out there already.
Last week I asked a question about finding the first column with data, and I very promptly had that answered, so thanks to those who did!
My query today is the other part to the question; how do I find the last column with data?
I must admit, I have already figured it out. Thing is, I think the way I've done it is a bit clunky and I'm looking for a more elegant way of doing it.
I've got a count of cells in a row, a column number cell, and an if statement to check if the first cell is a 0 to determine where to start from. Seems like there are too many steps.
The sample file attached has my way of doing it in column J, called last val and highlighted in blue.
Conditions and context: There would never be gaps in data, and either side of the data are 0s rather than blanks (data coming from a getpivotdata formula). First and last val and count columns are to reference a compound annual growth rate function using indirect.
Any help would be gladly appreciated.
Thanks in advance,
Alexis