+ Reply to Thread
Results 1 to 2 of 2

How do you apply the int() in VBA in order to convert numbers stored as text to numbers

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    At my desk
    MS-Off Ver
    2010
    Posts
    9

    Question How do you apply the int() in VBA in order to convert numbers stored as text to numbers

    Greetings,

    Stumbling on something probably easy for you all...
    I have a column of data I pull into a spreadsheet, then reference the cell with a VLOOKUP. Problem is; when I dump the data it overrides the formatting I have set up in that column and still stores it as text. I've also tried recording a macro to select the cells, then "Convert to Number" but the macro will NOT record that function.

    I would like to build converting the data into a number, into the code. Not sure how to do that though? Am I on the right track with the following - I didn't put it in as code because it's not a valid code...

    Range("B11:B10000").Select
    Selection.NumberFormat = "int()"

    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How do you apply the int() in VBA in order to convert numbers stored as text to number

    Try this...

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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