+ Reply to Thread
Results 1 to 10 of 10

Text to Number

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Text to Number

    Hi,

    I'm using an InputBox to obtain a number, however it records it as text (e.g. "5.5") instead of a number (5.5).

    How do I convert the text (inside the macro) to a number?

    Thanks

    Paul

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Text to Number

    Possibly...
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Text to Number

    Seems to do the trick. Thanks.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Text to Number

    Use InputBox Function instead
    e.g
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Text to Number

    Works also. Thanks.

    Is there a way to get a Title on the InputBox, rather than just Ïnput"?

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Text to Number

    Please Login or Register  to view this content.
    Ben Van Johnson

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Text to Number

    You will find all the protocols like Default value.

    https://docs.microsoft.com/en-us/off...ation.inputbox

  8. #8
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Text to Number

    Thanks. Also works just fine

  9. #9
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Text to Number

    Quote Originally Posted by jindon View Post
    You will find all the protocols like Default value.

    https://docs.microsoft.com/en-us/off...ation.inputbox
    Very handy. Thanks

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Text to Number

    You are welcome and thanks for the rep.

    When you want to limit the data type of return value, InputBox function is a better option.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Extracting number from text, no consistency on where number is located in text
    By yamalady in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2019, 12:17 PM
  2. [SOLVED] Count number of lines based on text and number criteria, without duplicates
    By HVCompleto in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2017, 07:17 AM
  3. VBA: Multiple text and number columns. Find list and number of unique words
    By first_jaguar in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-14-2017, 09:58 PM
  4. Replies: 5
    Last Post: 11-30-2014, 07:56 AM
  5. [SOLVED] Formula to count the number of spaces before text/number is written in a cell.
    By kmis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-12-2013, 05:05 PM
  6. Replies: 6
    Last Post: 01-31-2013, 02:50 AM
  7. Replies: 6
    Last Post: 07-29-2008, 03:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1