Hi
Brett,
You can use the
SUBSTITUTE function in Excel to replace all commas with dashes in cell A1. Here's how:
- In cell B1, enter the following formula:
Formula:
=SUBSTITUTE(A1,",","-")
- Press Enter.
This formula will replace all commas in cell A1 with dashes and display the result in cell B1.
If you want to count the number of commas in cell A1, you can use the
LEN and
SUBSTITUTE functions together. Here's how:
- In cell B1, enter the following formula:
Formula:
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))
- Press Enter.
This formula will count the number of commas in cell A1 and display the result in cell B1.