Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Melissa
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Protecting cells & auto filling date ccarmock Excel Discussion (Misc queries) 7 September 30th 05 09:21 PM
Averaging Values in Auto Filter Mr. Jan Park Excel Worksheet Functions 1 August 3rd 05 03:51 PM
Custom Function not being auto calculated when cells change..help? Alex Wolff Excel Worksheet Functions 4 March 22nd 05 07:06 PM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM
Why can't my macro use Auto Filter when I told the Sheet Protecti. KC Rippstein Excel Worksheet Functions 1 October 28th 04 06:13 PM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"