Good Day,
I am trying to write a formula to count the number of specific characters in a cell. This has proved successful to a degree utilising a LEN formula that I have listed below:
=LEN(A1)+(1)-LEN(SUBSTITUTE(A1,"+",""))
With the above formula I am counting how many times the plus (+) symbol appears in the cells in column A and then adding the value of 1 to the total and this is calculating correctly.
The below example shows the correct count of characters in column A utilising the above formula:
[TABLE="width: 212"]
<tbody>[TR]
[TD]Column A - Data[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]1+2+2.4+2+6[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]1+2+3+4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1+4+7+6.5+7.86+3[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Now I want to expand the formula to include an additional character. This would be the minus (-) symbol.
I need the formula to count how many times either the plus (+) or minus (-) symbol appear in a cell in column A and add these two counts together and then add an additional value of 1.
The below example shows the desired total count of characters in column A:
[TABLE="width: 212"]
<tbody>[TR]
[TD]Column A - Data[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]5+4+5+3.0-6[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]8-3+6-3-1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]9+4+2-2-2-1[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Is there any way to expand my existing formula to count more than one character (i.e. the plus (+) and minus (-) symbols together)?
Any assistance in this regard would be greatly appreciated.
Best Regards,
Jay
I am trying to write a formula to count the number of specific characters in a cell. This has proved successful to a degree utilising a LEN formula that I have listed below:
=LEN(A1)+(1)-LEN(SUBSTITUTE(A1,"+",""))
With the above formula I am counting how many times the plus (+) symbol appears in the cells in column A and then adding the value of 1 to the total and this is calculating correctly.
The below example shows the correct count of characters in column A utilising the above formula:
[TABLE="width: 212"]
<tbody>[TR]
[TD]Column A - Data[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]1+2+2.4+2+6[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]1+2+3+4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1+4+7+6.5+7.86+3[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Now I want to expand the formula to include an additional character. This would be the minus (-) symbol.
I need the formula to count how many times either the plus (+) or minus (-) symbol appear in a cell in column A and add these two counts together and then add an additional value of 1.
The below example shows the desired total count of characters in column A:
[TABLE="width: 212"]
<tbody>[TR]
[TD]Column A - Data[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]5+4+5+3.0-6[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]8-3+6-3-1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]9+4+2-2-2-1[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Is there any way to expand my existing formula to count more than one character (i.e. the plus (+) and minus (-) symbols together)?
Any assistance in this regard would be greatly appreciated.
Best Regards,
Jay