I have two cells that both have text and numbers in them from a ‘COUNTIFS’ formula. Such as:

**Number of X: 4**

**Total Number of X: 10**

How do I divide the two outputted numbers together two calculate a percentage?

You’ll have to use string manipulation here. Assuming your supplied values are in `A1`

and `B1`

, respectively, you can use:

```
=RIGHT(A1, LEN(A1)-FIND(":", A1)-1)/RIGHT(B1, LEN(B1)-FIND(":", B1)-1)
```

Which isn’t pretty, but neither is your data.

This will output `0.4`

which you can format into a percentage or multiple by 100 or whatever suits your downstream needs.

### Answer：

Tags: excelexcel, text