Forum Discussion
JackyGrealish
Jul 13, 2022Copper Contributor
Using IF and LEN formula for a cell
Hi, I work at a energy company where I need to paste value of system sizes, for eg. 8.73MW . I used formula: =LEFT(G5,LEN(G5)-2) to remove the 'MW'. And used IF to see if value is below 30, multipl...
- Jul 13, 2022
ecovonrein
Jul 13, 2022Iron Contributor
=SUBSTITUTE(G5;"MW";"000")*1
Mind, that only works if people don't use space. I might observe that it is poor style to put the unit measure into the same field as the quantity. Better split across two cells.
JackyGrealish
Jul 13, 2022Copper Contributor
Hi ecovonrein , I think I missed out something on what I meant in the chat above. The values taken can also be in kW. So for some instances can be for e.g. 4.7MW or can also be 880kW. But I want to create it such that any value M or k is converted to kW only. So if 4.7MW becomes 4700kW while 880kW remains as it is.
- SergeiBaklanJul 13, 2022Diamond Contributor
- JackyGrealishJul 13, 2022Copper ContributorThanks for this!
- SergeiBaklanJul 13, 2022Diamond Contributor
JackyGrealish , you are welcome
- ecovonreinJul 13, 2022Iron ContributorYes? My suggestions do that. Unless you actually want the letter "kW" in the result, in which case you still need to append them. But the answers are in kW.