ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Input Box Question (https://www.excelbanter.com/excel-discussion-misc-queries/135661-input-box-question.html)

bumper338

Input Box Question
 
I am using an input box to enter a number into a cell, but when I try to
enter a half number (for example .5), the cell rounds the number up to a
whole number. How do I format the cell to get the .5 to enter into the cell
and not have it round up to 1? I have tried formatting the cell as text but
still no luck.


Any suggestions?

Nick Hodge

Input Box Question
 
Bumper

Can you give a little more detail what the inputbox is, are you displaying
this through code and is it Excel's inputbox (method) or VBA's Inputbox
function?

Just need a little more detail

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"bumper338" wrote in message
...
I am using an input box to enter a number into a cell, but when I try to
enter a half number (for example .5), the cell rounds the number up to a
whole number. How do I format the cell to get the .5 to enter into the
cell
and not have it round up to 1? I have tried formatting the cell as text
but
still no luck.


Any suggestions?



Wood Grafing

Input Box Question
 
Sub input_test()
strInput = InputBox("Number Please?", "Wee!")
Range("A1") = strInput
End Sub

"bumper338" wrote:

I am using an input box to enter a number into a cell, but when I try to
enter a half number (for example .5), the cell rounds the number up to a
whole number. How do I format the cell to get the .5 to enter into the cell
and not have it round up to 1? I have tried formatting the cell as text but
still no luck.


Any suggestions?


Wood Grafing

Input Box Question
 
I forgot to mention, works fine as is when entering .5, but the cell A1 was
set to General formatting.

HTH

"Wood Grafing" wrote:

Sub input_test()
strInput = InputBox("Number Please?", "Wee!")
Range("A1") = strInput
End Sub

"bumper338" wrote:

I am using an input box to enter a number into a cell, but when I try to
enter a half number (for example .5), the cell rounds the number up to a
whole number. How do I format the cell to get the .5 to enter into the cell
and not have it round up to 1? I have tried formatting the cell as text but
still no luck.


Any suggestions?


bumper338

Input Box Question
 
That worked, thanks.

"Wood Grafing" wrote:

I forgot to mention, works fine as is when entering .5, but the cell A1 was
set to General formatting.

HTH

"Wood Grafing" wrote:

Sub input_test()
strInput = InputBox("Number Please?", "Wee!")
Range("A1") = strInput
End Sub

"bumper338" wrote:

I am using an input box to enter a number into a cell, but when I try to
enter a half number (for example .5), the cell rounds the number up to a
whole number. How do I format the cell to get the .5 to enter into the cell
and not have it round up to 1? I have tried formatting the cell as text but
still no luck.


Any suggestions?



All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com