GabrielAIK
New Member
- Joined
- Apr 23, 2018
- Messages
- 20
Hi,
I have a quite cumbersome (?) question I would love to receive tips regarding.
So I have a cell (W48) where I will have a share price. However, this share price will have commas instead of decimal points. Now, I want to turn this number to a "correct" one in cell W39.
So let's say cell W48 is "228,0", I want the cell W39 to display the number "228.0".
The difficulty is that the share price can go from basically 0-1,000.
What I have done thus far (which is incorrect) in cell W39 is to type this formula:
=IF(W48>=100,LEFT(W48,3)+(RIGHT(W48,2)/100),IF(LEFT(W48,2)>=10,LEFT(W48,2)+(RIGHT(W48,2)/100),IF(LEFT(W48,1)>=1,LEFT(W48,1)+(RIGHT(W48,2)/100),"ERROR")))
So what I am trying to do is:
If cell W48 is 100.00-999.00, I am going to use a "LEFT"-formula to take the three left values, and then the "RIGHT"-formula to take the decimal points.... Etc.
However, this does not work for all values.
If I write a number between 100,00-999,00 in cell W48, it works, but if I write e.g. "22,00" in that cell, then I get a #VALUE!-error in cell W-39.
Sorry if I don't make any sense, I can try to clarify if you don't understand my problem.
Appreciate all help I can get!
I have a quite cumbersome (?) question I would love to receive tips regarding.
So I have a cell (W48) where I will have a share price. However, this share price will have commas instead of decimal points. Now, I want to turn this number to a "correct" one in cell W39.
So let's say cell W48 is "228,0", I want the cell W39 to display the number "228.0".
The difficulty is that the share price can go from basically 0-1,000.
What I have done thus far (which is incorrect) in cell W39 is to type this formula:
=IF(W48>=100,LEFT(W48,3)+(RIGHT(W48,2)/100),IF(LEFT(W48,2)>=10,LEFT(W48,2)+(RIGHT(W48,2)/100),IF(LEFT(W48,1)>=1,LEFT(W48,1)+(RIGHT(W48,2)/100),"ERROR")))
So what I am trying to do is:
If cell W48 is 100.00-999.00, I am going to use a "LEFT"-formula to take the three left values, and then the "RIGHT"-formula to take the decimal points.... Etc.
However, this does not work for all values.
If I write a number between 100,00-999,00 in cell W48, it works, but if I write e.g. "22,00" in that cell, then I get a #VALUE!-error in cell W-39.
Sorry if I don't make any sense, I can try to clarify if you don't understand my problem.
Appreciate all help I can get!