# Countif and offsetting

#### GDBR

##### New Member
Hi,

I would like to place the letter P in a cell if the count of that cell and the preceding cells is less then of equal to the number in a different cell. I would like this to continue down the row until the cell containing the P is the same number as the different cell (see below). I have tried to use an if and countif formula.

 TOTAL 5 101 P 102 P 103 P 104 P 105 P 106 107 108

<tbody>
</tbody>

### Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try =IF(COUNT(A\$3:A3)<=\$B\$1,"P","") in B3 and copy to B4 to B10
Sergio

Replies
4
Views
222
Replies
3
Views
83
Replies
5
Views
165
Replies
11
Views
371
Replies
0
Views
179

1,196,200
Messages
6,013,982
Members
441,799
Latest member

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back