Hi, I am using the formula below to determine if all entries in a column range are the same (if they are than it inserts that item). The range starts at G41 and the indirect is picking up the last row number based on a value in A1. I use this type of formula many times in my workbook and rather than have all of those indirects I am looking for an alternative - maybe using a method to find the last row with data. I researched online but not sure which is the best method. Any help is appreciated.
Code:
=IF(COUNTA($F$41:INDIRECT("$F"&$A$1))=COUNTBLANK($F$41:INDIRECT("$F"&$A$1))," ",IF(COUNTIF($F$41:INDIRECT("$F"&$A$1),$F$41)=(COUNTA($F$41:INDIRECT("$F"&$A$1))-COUNTBLANK($F$41:INDIRECT("$F"&$A$1))),$F$41,""))