I have an Excel spreadsheet of velocity values (see link below) with some blanks interspersed. I am trying to loop through each row and return the range of the longest set of contiguous non-blank cells in each row. I will ultimately use the range address to perform other functions (i.e., average the values within this range). I have used the code below to count the number of columns in a range before, but haven't figured out how to count only non-blank cells and continue counting in the same row.
ColumnCount = Cells(1, Columns.Count).End(xlToLeft).Column
Thank you! Any help would be much appreciated! Marie