mshbhwn98
09-22-2014, 11:26 AM
Hi,
How to I find the length of a range that is defined by a variable? I am defining a range by looping through it and adding to it whenever the value is non-zero. So the range could end up being random cells down a column. I want to compare the length of the minimum value of that range and the length of the maximum value stored in the cells of that range but I am running into a few problems. Any help would be appreciated. I tried something like this...
Dim minimum as double
minimum = application.worksheetfunction.Min(xRng)
minLength = len(minimum)
but I keep getting 8 as that is the length of the double I guess?
Thanks
How to I find the length of a range that is defined by a variable? I am defining a range by looping through it and adding to it whenever the value is non-zero. So the range could end up being random cells down a column. I want to compare the length of the minimum value of that range and the length of the maximum value stored in the cells of that range but I am running into a few problems. Any help would be appreciated. I tried something like this...
Dim minimum as double
minimum = application.worksheetfunction.Min(xRng)
minLength = len(minimum)
but I keep getting 8 as that is the length of the double I guess?
Thanks