However, the rng keeps getting set to $N$2:$N$2047. With my current filter, my header row (1) is visible, as are rows 901 to 937. SumVisible = Format(WorksheetFunction.Sum(rng), "$#,#.#") ' Debug.Print "Range: " & rng.Address & ", Sum: " & WorksheetFunction.Sum(rng) Set rng = Range("N2:N2047").SpecialCells(xlCellTypeVisible) Here's my function: Function sumVisible() As String I saw this thread but it gives me the same type of issue I'm having. The data starts in row 2, and ends at row 2047. I simply want to calculate the total values in column N, that are visible. I have a dataset that I'm using a filter on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |