Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Baltimore, MD, Maryland, USA
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format data copy from Web Site (Office XP Windows XP)

    Hi Everyone:
    I have a problem getting EXCEL to recognize that what look to be numbers as numbers. The istext function returns "TRUE" but the VALUE function will not convert the cell values to a number format. I tried multiplying by 1 using the copy, paste special, Multiply trick to no avail. I have run out of gas on this. Anyone with an answer, please jump in.
    Regards
    Stephen <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Format data copy from Web Site (Office XP Windows XP)

    Hi Stephen,

    Give the following two macros a go:

    Option Explicit
    Sub TrimRange()
    Dim Cell As Range
    Selection.Replace What:=Chr(160), Replacement:=Chr(32) 'Replace non-breaking space with std space.
    For Each Cell In Selection.SpecialCells(xlConstants)
    Cell.Value = Application.Trim(Cell.Value) ' Delete "Application." on this line to maintain any internal double-spacing.
    Next Cell
    End Sub

    Sub ClearTickMarks()
    Dim CellContent As Variant, NewData As Variant
    For Each CellContent In Selection
    If CellContent.HasFormula = False Then
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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