Jeffrey Mahoney
Well-known Member
- Joined
- May 31, 2015
- Messages
- 2,827
- Office Version
- 365
- Platform
- Windows
I use match all the time in dynamic named ranges. Those ranges usually have values of alpha or numeric or both.
This time, I'm trying to find the last cell in a column where a value or a formula results in cell content length greater than zero.
I start off with a cell at the top of the column where a user can enter a lock set number. The lock set number populates down the column as the user fills in data in the form. The formula is checking to see if the user has filled out the row of values so it can put a lock number in that row. If the user hasn't reached that point, it results in a blank:
=IF(LEFT(UPPER(A1009),1)="I",LastLock(S$13:S1007),"")
LASTLOCK is a user defined function that i wrote to look at the cells provided and return the last non-empty cell. That UDF is slow and I prefer to use a formula if I can. Because there are a limited number of locks in a set, the user has the ability to overwrite the formula with a new lock set number in the column.
I have over a 1,000 rows in the form. I tried this formula, but it is catching all of the zero length (null) cells where there is a formula. So I always get the last row.
=MAX(IFERROR(MATCH("zzzzz",S$13:S1007),0),IFERROR(MATCH(1E+100,S$13:S1007),0))
I've searched the site and I'm at a loss.
Jeff
This time, I'm trying to find the last cell in a column where a value or a formula results in cell content length greater than zero.
I start off with a cell at the top of the column where a user can enter a lock set number. The lock set number populates down the column as the user fills in data in the form. The formula is checking to see if the user has filled out the row of values so it can put a lock number in that row. If the user hasn't reached that point, it results in a blank:
=IF(LEFT(UPPER(A1009),1)="I",LastLock(S$13:S1007),"")
LASTLOCK is a user defined function that i wrote to look at the cells provided and return the last non-empty cell. That UDF is slow and I prefer to use a formula if I can. Because there are a limited number of locks in a set, the user has the ability to overwrite the formula with a new lock set number in the column.
I have over a 1,000 rows in the form. I tried this formula, but it is catching all of the zero length (null) cells where there is a formula. So I always get the last row.
=MAX(IFERROR(MATCH("zzzzz",S$13:S1007),0),IFERROR(MATCH(1E+100,S$13:S1007),0))
I've searched the site and I'm at a loss.
Jeff