Perhaps a possible alternative to simplify ?
One play would be to concatenate the range string from an input for the
column of interest, then use INDIRECT in the COUNTIF ..
Let's reserve cell E1 for input of the column of interest
Enter in E1: A
Put in say, F1: =E1&"1:"&E1&"100"
Then you could put in say, G1:
=COUNTIF(INDIRECT(F1),"<0:05:00")/COUNT(INDIRECT(F1))
which would return the equivalent of:
=COUNTIF(A1:A100,"<0:05:00")/COUNT(A1:A100)
We could also extend the concatenation of the string in F1 to include
variations in the row references as well, besides the column reference, for
example:
If we were to reserve cells E1:E3 for inputs of column, start row, end row,
e.g. inputs made:
In E1: A
In E2: 1
In E3: 100
Then we could just amend the formula in F1 to: =E1&E2&":"&E1&E3
and use the same formula in G1
Adapt to suit ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik
----
"dofnup" <[email protected]> wrote in message
news:[email protected]...
> OK, here's my situation:
>
> I have many columns of times. I need to find out what percentage of that
> column is below 5 mins, which percentage is below 1 hour, which percentage
is
> above one hour, etc, etc.
>
> I am using the following formula structure:
>
> =COUNTIF(A1:A100,"<0:05:00")/COUNT(A1:A100)
> =COUNTIF(A1:A100,">1:00:00")/COUNT(A1:A100)
> etc etc
>
> Is is at all possible to create a custom function so that I don't have to
> type all that stuff for every different range? Since some columns are
> hundreds, other's are a small number, it's pretty random, so a custom
> function would be ideal, with the range as the argument, however, i would
> need to reference COUNTIF and COUNT, and i don't know how to do that or if
it
> is even at all possible.
>
> Any help on this would be greatly appreciated!1 Thanks in advance ...
Bookmarks