Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 38
Default automate cell to divide by 1000

Hi

i want to automate a cell/cells to be automatically divide by 1000

eg in cell A1, if i enter 1000,000 then the outcome should be 1,000.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 108
Default automate cell to divide by 1000

Hi Rohit,

eg in cell A1, if i enter 1000,000 then the outcome should be 1,000.


Use a custom number format.
More number formats, then select Custom, then enter
#,##0,
including the trailing comma.

Ed Ferrero
www.edferrero.com
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,624
Default automate cell to divide by 1000

Note that the custom format doesn't actually change the value/outcome
that's stored in the cell.

To actually change the value, one way is to choose Tools/Options/Edit

and change the Fixed decimal places input box to 3.


Note that this is a global setting and will affect all cells.

To change only A1, you could also use an event macro - post back if
you'd like to see that option.


In article ,
"Ed Ferrero" wrote:

Hi Rohit,

eg in cell A1, if i enter 1000,000 then the outcome should be 1,000.


Use a custom number format.
More number formats, then select Custom, then enter
#,##0,
including the trailing comma.

Ed Ferrero
www.edferrero.com

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default automate cell to divide by 1000

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A10"
Dim cell As Range
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
For Each cell In Target
cell.Value = cell.Value / 1000
Next cell
End If
ws_exit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste the above into
that sheet module.

Edit to suit and Alt + q to return to Excel.


Gord Dibben MS Excel MVP

On Thu, 26 Nov 2009 21:42:05 -0800, Rohit
wrote:

Hi

i want to automate a cell/cells to be automatically divide by 1000

eg in cell A1, if i enter 1000,000 then the outcome should be 1,000.

Thanks


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
How to divide a number with "less than" sign? ie: <1/1000 = <0.001 justinbeau Excel Worksheet Functions 3 March 4th 09 09:50 AM
divide many cells by 1000 [email protected] Excel Discussion (Misc queries) 6 January 29th 09 03:26 PM
Divide Cells on a spreadsheet by 1000 Django Excel Discussion (Misc queries) 3 July 14th 08 04:42 PM
Divide selected cells by 1000 Lowkey Excel Worksheet Functions 5 April 25th 06 11:38 PM
Formating cell to 1000 BMBCNJ Charts and Charting in Excel 3 December 15th 04 03:52 AM


All times are GMT +1. The time now is 11:58 PM.

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"