ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Locking formula for a Sort (https://www.excelbanter.com/excel-discussion-misc-queries/17571-locking-formula-sort.html)

David

Locking formula for a Sort
 
I have an issue. I have this formula looking for numbers in a group:

I have two columns A and B
A1: "1"
A2: "2"
....
A10: "10"

B1: =COUNTIF(M3:R812,"01")
B2: =COUNTIF(M3:R812,"02")...
.... down to
B10: =COUNTIF(M3:R812,"10")

This gives me a large result which is what I want but then if I try to Sort
by Column B the formula will change to =COUNTIF(M13:R757,"01") <whatever it
may be

I am looking to have it that the CountIf works but the formula will hold the
range of M3:R812 no matter what I sort by.

Biff

Hi!

Use absolute references in your formulas:

=COUNTIF($M$3:$R$812,"01")

Biff

-----Original Message-----
I have an issue. I have this formula looking for numbers

in a group:

I have two columns A and B
A1: "1"
A2: "2"
....
A10: "10"

B1: =COUNTIF(M3:R812,"01")
B2: =COUNTIF(M3:R812,"02")...
.... down to
B10: =COUNTIF(M3:R812,"10")

This gives me a large result which is what I want but

then if I try to Sort
by Column B the formula will change to =COUNTIF

(M13:R757,"01") <whatever it
may be

I am looking to have it that the CountIf works but the

formula will hold the
range of M3:R812 no matter what I sort by.
.



All times are GMT +1. The time now is 06:04 AM.

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