Accuracy

Baked_potato

New Member
Joined
Feb 23, 2021
Messages
32
Office Version
  1. 2007
Platform
  1. Windows
Hello experts,


I badly need help on this problem.

I have 3 textboxes : Textbox1 , textbox2, textbox3.

I want to do the subtraction:

Textbox3.value = texbox1.value - textbox2.value

1.034 - 1.035 =-0.001

I was expecting -0.001 is the answer but the textbox3 displayed like this ( see the picture )
1636502913277.png



Many thanks in advance.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Are these the only text boxes you have on the userform?
- The names in the equation may be referring to other textboxes
Is the code copied directly from your module?
- Textbox1.value is missing the second "t"
Are you setting default values as the userform is initialized?
- You might have some other random default data in there
When are you calculating the Textbox3?
- It might be that the calculation is happening before all the data is entered

Just some things to look into and to provide us all with more information.
 
Upvote 0
Upvote 0
Solution
Is "1.034" number "1034" (one thousand and thirty four)?
And "1.035" number "1035.0000000000001"?
textbox 2 maybe result from formula?
 
Upvote 0
Is "1.034" number "1034" (one thousand and thirty four)?
And "1.035" number "1035.0000000000001"?
textbox 2 maybe result from formula?

Hi sir,

Textbox1 = 1.034 only
textbox2 = 1.035 only

textbox3 is the difference of textbox1 minus texbox2
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,706
Members
449,118
Latest member
MichealRed

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