drag down the text in criteria along with cell range while using countifs

Copper Contributor
Risk of InjuryNov-21Dec-21problem
Slip and Trip20=COUNTIF(SO!$E$769:$E$793,"Slip and Trip")
Cut injury36=COUNTIF(SO!$E$769:$E$793,"Cut injury")
Housekeeping00 
Physical injury10 

While dragging down the formula, text slip and trip or cut injury or housekeeping not changing according to the risk of injury column.

It only copying the same formula. =COUNTIF(SO!$E$769:$E$793,"Slip and Trip") in all cells.

 

need solution

 

2 Replies

@Mukesh8734 Rather than including the part "Slip and Trip", use a reference to the cell (without $ signs) that contains that phrase. The formula could then look like:

 

=COUNTIF(SO!$E$769:$E$793,A2)

 

Copy it down and A2 will change to A3 and so on.

Thanks a lot sir, you make my work very easy ad it saves 2 hours for me.
Thank you once again