+ Reply to Thread
Results 1 to 2 of 2

VBA to format cells to Values

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    VBA to format cells to Values

    I have a column of data where some data are showing as values and some data is showing as a number with an error message attached to it asking me to convert to a number?

    Is there a way to convert all the data to a number through VBA?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,298

    Re: VBA to format cells to Values

    Usually you can just use Text to columns on it manually (assuming the cells aren't formatted as Text - if they are you should change that first), or in VBA:
    With selection
    .numberformat = "General"
    .value2 = .value2
    End With
    for example.
    Remember what the dormouse said
    Feed your head

+ 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] Auto format for specific values in cells
    By flgrl0117 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-22-2013, 01:06 PM
  2. How to format cells to accept numerical values only.
    By KMTrombley in forum Excel General
    Replies: 2
    Last Post: 11-08-2012, 11:41 AM
  3. Format Excel cells based on values on other cells
    By rocketscience in forum Excel General
    Replies: 2
    Last Post: 06-13-2012, 09:41 AM
  4. Format a range of cells to numerical values.
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-06-2011, 03:14 PM
  5. Format Cells as Values
    By rebbrann in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-13-2007, 05:32 AM

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