Formula (or code) return the largest number of duplicates in a list.
please tell me in words what you want to do.
The values in column A are temperatures listed at a given interval. The user enters the value in F1. If he wants to know how many times the temp was the same for 11 "intervals" (days hours or what ever the interval is) then F1 is set to 11.
The code finds any entry in column A that occurs consecutively the number of time as F1's value and posts it in column B at the cell where the 11th occurrence is. So in column B there are a number of scattered entries that look like "10.22 = 11 times" or "9.15 = 11 times" etc.
Then all those values in column B are consolidated in column C for easy reading, instead of having to scroll down many rows/pages.
B & C are cleared to ready the code to re-write new info to them with the next F1 query.
I am trying to error trap if F1 is set higher than any number of consecutive temps in column A.
But it is erring at a number 1 less than the max occurrence in A.
Howard
|