Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Excel

Cell Number Format

 
Jump to:  
 
chris
PostPosted: Wed Jul 02, 2008 4:47 pm    Post subject: Cell Number Format
       
Is there a way to format a cell's number from 1.2 to 1,200,000? I
know how to format millions to ones but how do I convert from ones to
millions? (I don't want to have to multiply in another cell).

Thanks!!!
 

 
AltaEgo
PostPosted: Thu Jul 03, 2008 8:13 am    Post subject: Re: Cell Number Format
       
I could be wrong but, suspect there is no way to achieve what you want using
format.

You could use the sheet change event to multiply numbers entered by one
million and format the result as you wish using code below. Just right-click
on the tab of the appropriate worksheet, click view code and paste. Note.
this will multiply value in column C only. You will need to modify to make
it work on the range you wish.


--
Steve


' *******************************************

Private Sub Worksheet_Change(ByVal Target As Range)



On Error GoTo Worksheet_Change_Error

Set isect = Application.Intersect(Target, Range("C:C"))
' C:C refers to column C
' change this to reference a different range
If isect Is Nothing Then
'do nothing
Exit Sub
Else
If Target.Value < 100000 Then
Target.Value = Target.Value * 1000000
End If

End If


On Error GoTo 0
Exit Sub

Worksheet_Change_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
Worksheet_Change of VBA Document Sheet1"

End Sub

' *******************************************
"chris" <csnishimoto@yahoo.com> wrote in message
news:57f2e72f-082e-4ad9-97b6-a0451343b93d@c19g2000prf.googlegroups.com...
Quote:
Is there a way to format a cell's number from 1.2 to 1,200,000? I
know how to format millions to ones but how do I convert from ones to
millions? (I don't want to have to multiply in another cell).

Thanks!!!
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

gratka sypialnia Zwrot podatku z anglii monitoring wizyjny uwodzenie