What's the difference between .4 and 0.4?

litestream

Active Member
Joined
Jul 24, 2006
Messages
323
I have a user form which I decuct stock from by inputting values. But it doesn't see .4 as being identical to 0.4. Is there a reason for this, or do I have to type the 0 every time?
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,915
Office Version
  1. 365
Platform
  1. Windows
If it's a userform then the values are probably being treated as text.

And in text .4<>0.4.:)
 

litestream

Active Member
Joined
Jul 24, 2006
Messages
323
I figured it was something like that. Is there a way to treat user form entries as numbers?
 

scifibum

Well-known Member
Joined
Jul 22, 2004
Messages
503

ADVERTISEMENT

or explicity convert them to a numeric type with cdbl or cdec functions
 

Watch MrExcel Video

Forum statistics

Threads
1,113,917
Messages
5,545,024
Members
410,647
Latest member
bernardazar
Top