fill formula to next row

%3CLINGO-SUB%20id%3D%22lingo-sub-355490%22%20slang%3D%22en-US%22%3Efill%20formula%20to%20next%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355490%22%20slang%3D%22en-US%22%3E%3CP%3Ei'm%20trying%20to%20copy%20this%20formula%20%3D%3CSTRONG%3ECOUNTIF(A2%3AR155%2CB2)%20%3C%2FSTRONG%3Eto%20the%20next%20row%20and%20fill%20the%20it%20to%26nbsp%3B%3D%3CSTRONG%3ECOUNTIF(A2%3AR155%2CB3).%20%3C%2FSTRONG%3Ewhat%20happens%20when%20i%20drag%20the%20box%26nbsp%3B%3D%3CSTRONG%3ECOUNTIF(A3%3AR156%2CB2)%20.%20%3C%2FSTRONG%3Eif%20i%20copy%20the%20formula%20and%20paste%20i%20get%3CSTRONG%3E%3DCOUNTIF(A2%3AR155%2CB2)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20advise%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-355490%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355595%22%20slang%3D%22en-US%22%3ERe%3A%20fill%20formula%20to%20next%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355595%22%20slang%3D%22en-US%22%3Ewow!%3CBR%20%2F%3Eit%20worked.%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355498%22%20slang%3D%22en-US%22%3ERe%3A%20fill%20formula%20to%20next%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355498%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20to%20make%20the%20criteria%20range%20absolute%20(Locked)%20by%20preceding%20the%20row%20and%20column%20references%20by%20the%20dollar%20sign%20as%20follows%3A%3C%2FP%3E%3CPRE%3E%3DCOUNTIF(%24A%242%3A%24R%24155%2CB2)%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20will%20prevent%20the%20range%20from%20changing%20when%20copying%20the%20formula%20down.%3C%2FP%3E%3CP%3ETo%20learn%20more%20about%20that%2C%20please%20check%20out%20this%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fswitch-between-relative-absolute-and-mixed-references-dfec08cd-ae65-4f56-839e-5f0d8d0baca9%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

i'm trying to copy this formula =COUNTIF(A2:R155,B2) to the next row and fill the it to =COUNTIF(A2:R155,B3). what happens when i drag the box =COUNTIF(A3:R156,B2) . if i copy the formula and paste i get=COUNTIF(A2:R155,B2)

 

please advise

2 Replies

Hi,

 

You have to make the criteria range absolute (Locked) by preceding the row and column references by the dollar sign as follows:

=COUNTIF($A$2:$R$155,B2)

 

This will prevent the range from changing when copying the formula down.

To learn more about that, please check out this link.

 

Hope that helps

wow!
it worked.

thanks