I have a column of data with varying length and I use the formula below to return a value. Is there a way to have excel determine the last cell in the column without using VBA? My assumption (I've tried a few times) is to use INDIRECT, but it keeps returning a numeric value (column is names).
Here is my current formula: {=AVERAGE(IF(('Paste Report HERE'!$A1:$A5000=E1),'Paste Report HERE'!$E1:$E5000))}
'Paste Report HERE' is the worksheet with a list of names in column A [Name 1, Name1, Name 2, Name 2]. Column E of that same sheet has a list of time [00:00:45, 00:00:36, 00:02:42, 00:00:55]
The value in cell E1 from tab where the formula resides is the name of the person whos times I'm trying to average [Name 1]
The unknown column length is the A and E column lengths. I set to 5000, but it could be anything. In VBA I could use LastRow or something to get the value but can I get it without VBA? I have several formulas in the spreadsheet which could use this same method.
Another example: (in this case 9000) to represent the last cell in the column. The formula below counts the unique instances of a value based on another value matching.
{=SUM(IF(FREQUENCY(IF($A$2:$A$9000=$L2,IF($J$2:$J$9000<>"",MATCH($J$2:$J$9000,$J$2:$J$9000,0))),ROW($J$2:$J$9000)-ROW($A$2)+1),1))}
Check Column A for value found in cell L2. Where ever there is a match look at column J and return the number of times a unique value is found. Column A = names & Column J is Dates. The Formula returns a number (like 6 if I run the report for a 6 day range and the person appears on all 6 days).
Thanks for the help!
Here is my current formula: {=AVERAGE(IF(('Paste Report HERE'!$A1:$A5000=E1),'Paste Report HERE'!$E1:$E5000))}
'Paste Report HERE' is the worksheet with a list of names in column A [Name 1, Name1, Name 2, Name 2]. Column E of that same sheet has a list of time [00:00:45, 00:00:36, 00:02:42, 00:00:55]
The value in cell E1 from tab where the formula resides is the name of the person whos times I'm trying to average [Name 1]
The unknown column length is the A and E column lengths. I set to 5000, but it could be anything. In VBA I could use LastRow or something to get the value but can I get it without VBA? I have several formulas in the spreadsheet which could use this same method.
Another example: (in this case 9000) to represent the last cell in the column. The formula below counts the unique instances of a value based on another value matching.
{=SUM(IF(FREQUENCY(IF($A$2:$A$9000=$L2,IF($J$2:$J$9000<>"",MATCH($J$2:$J$9000,$J$2:$J$9000,0))),ROW($J$2:$J$9000)-ROW($A$2)+1),1))}
Check Column A for value found in cell L2. Where ever there is a match look at column J and return the number of times a unique value is found. Column A = names & Column J is Dates. The Formula returns a number (like 6 if I run the report for a 6 day range and the person appears on all 6 days).
Thanks for the help!