newbieexcel24
New Member
- Joined
- Mar 14, 2024
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Hi,
I'm trying to convert cells of weights/volumes to a numerical value ie 7kg becomes 7000. I don't understand why the formula below doesn't work for 'ml'. The formula i'm using is:
=IF(RIGHT(D3,1)="L", VALUE(LEFT(D3, LEN(D3)-1))*1000,IF(RIGHT(D3,2)="kg", VALUE(LEFT(D3, LEN(D3)-2))*1000, IF(RIGHT(D3,2)="ml", VALUE(LEFT(D3,LEN(D3)-2)), IF(RIGHT(D3,1)="g", VALUE(LEFT(D3,LEN(D3)-1)),D3))))
I have attached a screenshot.
I'm trying to convert cells of weights/volumes to a numerical value ie 7kg becomes 7000. I don't understand why the formula below doesn't work for 'ml'. The formula i'm using is:
=IF(RIGHT(D3,1)="L", VALUE(LEFT(D3, LEN(D3)-1))*1000,IF(RIGHT(D3,2)="kg", VALUE(LEFT(D3, LEN(D3)-2))*1000, IF(RIGHT(D3,2)="ml", VALUE(LEFT(D3,LEN(D3)-2)), IF(RIGHT(D3,1)="g", VALUE(LEFT(D3,LEN(D3)-1)),D3))))
I have attached a screenshot.