ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Countif Problem (https://www.excelbanter.com/excel-discussion-misc-queries/41768-countif-problem.html)

dave

Countif Problem
 
I'm having a problem with a calculation, it works fine if i know what the
last cell reference is, but unforunatley this figure will vary. How can i
find out what the last cell reference is going to be ? and how do i use that
in the calculation. Do i need to use a dummy reference ? The calculation i'm
using is :-

(countid(h4:h38,"<15"))/(countif(h4:h39,"0"))*100.

'H39' is the cell reference that will change depending on the amount of data
on the spreadsheet

Bob Phillips

How about just using the whole column

=COUNTIF(H:H,"<15")/(COUNTIF(H:H,"0"))*100

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dave" wrote in message
...
I'm having a problem with a calculation, it works fine if i know what the
last cell reference is, but unforunatley this figure will vary. How can i
find out what the last cell reference is going to be ? and how do i use

that
in the calculation. Do i need to use a dummy reference ? The calculation

i'm
using is :-

(countid(h4:h38,"<15"))/(countif(h4:h39,"0"))*100.

'H39' is the cell reference that will change depending on the amount of

data
on the spreadsheet




Bob Umlas

You can always include blank cells without affecting the result, so go way
beyond where you need, like the entire column.
=COUNTIF(H4:H65536,"<15")/COUNTIF(H4:H65536,"0")*100

"dave" wrote in message
...
I'm having a problem with a calculation, it works fine if i know what the
last cell reference is, but unforunatley this figure will vary. How can i
find out what the last cell reference is going to be ? and how do i use
that
in the calculation. Do i need to use a dummy reference ? The calculation
i'm
using is :-

(countid(h4:h38,"<15"))/(countif(h4:h39,"0"))*100.

'H39' is the cell reference that will change depending on the amount of
data
on the spreadsheet




Jerry W. Lewis

If H39 stands for the last cell containing data, you can simply use
(countid(h4:h38,"<15"))/(countif(h4:h2000,"0"))*100
or some other suitably large row number that will not be exceeded.

Otherwise, you need to say how the last row you want in the formula is
to be recognized.

Jerry

dave wrote:

I'm having a problem with a calculation, it works fine if i know what the
last cell reference is, but unforunatley this figure will vary. How can i
find out what the last cell reference is going to be ? and how do i use that
in the calculation. Do i need to use a dummy reference ? The calculation i'm
using is :-

(countid(h4:h38,"<15"))/(countif(h4:h39,"0"))*100.

'H39' is the cell reference that will change depending on the amount of data
on the spreadsheet




All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com