Ignoring the character X

Dannysamworth

New Member
Joined
Mar 8, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
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

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,493
Office Version
  1. 365
Platform
  1. Windows
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")
 
Solution

Dannysamworth

New Member
Joined
Mar 8, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top