I need to subtract a whole a number, which tells me how many digits to subtract from a decimal number. How do I do this?
It's better if i give an example:
Let's say, I need to first divide
Cell B18 by B22, = B18/B22
let's say the data entered will be
B18 = 36
B22 = .3
that equals 120
And, in cell C22, I have a number that has 3-5 decimal places.
Say, C22=1.92348
Now, the number 120 tells me, how many digits I need to subtract from 1.92348.
So the answer would be 1.92348 - 120 digits from the decimals, i.e. = 1.92228
The problem is not all the digits will be 5 decimal places, some will be 4, 3 or 2, etc. So for example, if the number on C22 is 1.92, then we will be subtracting 120 digits from 1.92 = .77
It's easy if it's always a certain number of decimal places. For example if two decimal places, then we can just make a set formula to turn the decimal number to a whole number then convert it back, say 1.92, would just be 1.92*100= 192-120 = 77. Then take the 77/100 = .77.
The problem is it's not always the same number of decimal places, so I can't make the formula always multiply by 100, 1000, or whatever it is to make it a whole number, then convert it back to a decimal.
How do I make the formula so it will do this calculation for me?
Sorry, I'm not good with excel. Thank you in advance for your help.
Bookmarks