Finding a number with 2 decimal places

shah0101

Board Regular
Joined
Jul 4, 2019
Messages
118
Hi Experts,

I have a value in C10 (say 37,313.58) which is fixed.

In B10 & B11 are Prices which can be changed
In A10 is A11 Quantity which can be changed

I need a formula / vba script to get exact two decimal place number (not rounded, not truncated) in:
(1) "B10" (range from 0.84 to 6.00) wholly divisible by "C10" by "A10"
(2) "B11" (range from 12.00 to 30.00) wholly divisible by "C11 by A11"


How we can find an exact two decimal places number by automatically change the number either in B10/B11 or A10/A11 to get the final number as in C10 (which is basically A10 * B10 or A11 * B11).


I don't know if I am making any sense! so uploaded a picture.
 

Attachments

  • 001.jpg
    001.jpg
    42.8 KB · Views: 11

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Assuming the quantity is a whole number, it is not possible with data you provided without rounding.
$37,313.58 divided by 0.84 to 6.00 in increments of 0.01 does not produce any whole numbers.
Neither does 12.00 to 30.00.
 
Upvote 0
Assuming the quantity is a whole number, it is not possible with data you provided without rounding.
$37,313.58 divided by 0.84 to 6.00 in increments of 0.01 does not produce any whole numbers.
Neither does 12.00 to 30.00.

WE CAN CHANGE BOTH THE QUANTITY (IN INTEGER) AND PRICE (WITH TWO DECIMAL PLACES) TO BRING THE VALUE. ANY IDEAS PLEASE?
 
Upvote 0
Can you give a simple example of what exactly you want to do, please ?

Actually, I just get the total invoice value and from that value I need to get the price (upto to decimal place) as mentioned above in the range. Quantity doesn't matter but it has to be an integer number without any decimals.
 
Upvote 0
Same question again.
Can you give a simple example of what exactly you want to do, please ?
Give us the input values, and the desired result please.
 
Upvote 0
I already advised that to the OP in post #2. He does not seem to understand.
Yes, you are right, I may be a bit vague or inaccurate in explaining my self.

Please see the image below. On row 224 I found a number with two decimal places in both price and quantity which is okay with me. This I got by copying and pasting hundreds of lines by increasing the price by 0.01 in each row. This is what I want in a single formula that I put in the value and Price and Quantity can comes up itself with an integer without decimal place OR maximum with two decimal places.

Please guide / advise.
 

Attachments

  • 001.jpg
    001.jpg
    207.3 KB · Views: 12
Upvote 0
On row 224 I found a number with two decimal places in both price and quantity which is okay with me. This I got by copying and pasting hundreds of lines by increasing the price by 0.01 in each row. This is what I want in a single formula that I put in the value and Price and Quantity can comes up itself with an integer without decimal place OR maximum with two decimal places.
So Quantity could be whole number or 1- 2 decimal?
Is it:
1st priority: whole number
2nd: from 1 to 2 decimal
?
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top