# Ignoring the character X

#### Dannysamworth

##### New Member
Hi,

I am trying to make a formula that will ignore the character x.

I am creating a timesheet where in a row of cells I enter initials of the project. On the total for that week it adds up the cells with text and gives the number of days the operative worked.

The formula I have used is

=COUNTIF(D6:J6,”**)

This works absolutely fine when the operative has worked all week, however I want to put an X in the cell that he has not worked and this not be recognised and counted.

Is there a way of doing this ?
Many thanks

Danny Samworth.

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

#### mart37

##### Well-known Member
=COUNTIF(D6:J6,”*")-COUNTIF(D6:J6,”X")

#### Dannysamworth

##### New Member
=COUNTIF(D6:J6,”*")-COUNTIF(D6:J6,”X")
Wow, worked perfectly.
Thank you so much for your help.

#### FormR

##### MrExcel MVP
Hi, another option you could try.

=COUNTIFS(D6:J6,"*",D6:J6,"<>X")

Or if you don't have any numbers in the range that you are trying to exclude from the count.

=COUNTIFS(D6:J6,"<>X")

#### Dannysamworth

##### New Member
Hi, another option you could try.

=COUNTIFS(D6:J6,"*",D6:J6,"<>X")

Or if you don't have any numbers in the range that you are trying to exclude from the count.

=COUNTIFS(D6:J6,"<>X")
Hi, thank you for you option,
I found that with this formula I can enter the character X along with other letters, foe example the initials KHX and this is recognised.

where as when I enter just the X for non attendance then it’s not counted.

Exactly what I needed,

thanks very much for your help.

Replies
3
Views
382
Replies
6
Views
89
Replies
0
Views
168
Replies
8
Views
297
Replies
0
Views
82

1,129,574
Messages
5,637,159
Members
416,959
Latest member
Mohzein

### 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