+ Reply to Thread
Results 1 to 2 of 2

why "formatting" is not auto-updated?

  1. #1
    Melissa
    Guest

    why "formatting" is not auto-updated?

    Why is it that when i format some cells (containing numbers) as text, the
    formatting is not applied immediately? I've had to "F2 + enter" each cell to
    get the changes to take effect. What am I doing wrong?

  2. #2
    Dave Peterson
    Guest

    Re: why "formatting" is not auto-updated?

    Changing the format of a cell tells excel to change the way it's displayed--not
    change the value of the cell.

    To change the value of the cell, you need to reenter the value (F2|enter is
    sufficient).

    If you have lots to do, you could use a helper column:
    =a1&""
    drag down
    convert to values (copy|paste special|values)
    and delete the original column.

    Or you could have a macro that does the work for you:

    Option Explicit
    Sub testme()
    Dim myCell As Range
    Dim myRng As Range

    Set myRng = Selection

    For Each myCell In myRng.Cells
    If myCell.HasFormula Then
    'do nothing
    Else
    myCell.NumberFormat = "@"
    myCell.Value = myCell.Value
    End If
    Next myCell
    End Sub

    If you're new to macros, you may want to read David McRitchie's intro at:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    Melissa wrote:
    >
    > Why is it that when i format some cells (containing numbers) as text, the
    > formatting is not applied immediately? I've had to "F2 + enter" each cell to
    > get the changes to take effect. What am I doing wrong?


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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