Yes, you can create a formula in Excel that counts the character "D" as 2 and the character "S" as 1. You can use the following formula:
=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(UPPER(A1),"D","DD"),"S",""))
This formula calculates the length of the cell A1 (LEN(A1)), subtracts the length of the cell A1 after replacing "D" with "DD" and "S" with an empty string (LEN(SUBSTITUTE(SUBSTITUTE(UPPER(A1),"D","DD"),"S",""))), and gives you the count of "D" as 2 and "S" as 1 based on your requirement.
Make sure to replace "A1" in the formula with the cell reference where your text is located.
IN EXCEL CAN I GET THE FORMULA WHICH COUNT D AS 2 AND S AS 1
1 answer