Theemeadelis
New Member
- Joined
- Jul 10, 2023
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
I have a data set where I need to remove the last comma that is appearing in a lot of the cells. As there is often a space after the last comma too, I have been using the below formula:
=LEFT(A1,LEN(TRIM(A1))-(RIGHT(TRIM(A1))=","))
Unfortunately I have found that if a cell has a zero before the last comma, the above formula is also removing the zero as well - please see the below example:
Does anyone know why this is happening, and how I can get the formula to work without also removing the zero that precedes the last comma?
=LEFT(A1,LEN(TRIM(A1))-(RIGHT(TRIM(A1))=","))
Unfortunately I have found that if a cell has a zero before the last comma, the above formula is also removing the zero as well - please see the below example:
Does anyone know why this is happening, and how I can get the formula to work without also removing the zero that precedes the last comma?