Formula to add/subtract text characters in a row.

aacod

Well-known Member
Joined
Mar 20, 2009
Messages
667
In row D28:AH28 in majority of the cells, I have X, L, TW, H and PV. Few cells do not have anything, just blank.

I need a formula to add cells which contain X, TW and subtract from that total cells containing L, H, PV and blank cells.

Thanks.

aacod.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Code:
=countif(d28:ah28,"x")+countif(d28:ah28,"tw")-countif(d28:ah28,"l")-countif(d28:ah28,"h")-countif(d28:ah28,"pv")-countif(d28:ah28,"")
 
Upvote 0
JoeMo,

The formula works perfect for the above description, but sorry for not describing perfectly what I wanted to accomplish.

I am trying to count a total of 'X' and 'TW', 'C, and 'CWS' from 30 to 31 cells each representing the day of the month and not count the 'L', 'H', 'PV' 'W' and blank cell(s).

Please see example below:

xxTW
xLWWxxTW
xLWWxxTW
xLWWxxTW
xLWWxx =18

<colgroup><col span="18" width="22"><col span="13" width="22"><col width="54"></colgroup><tbody>
</tbody>


Thanks.

aacod
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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
Back
Top