Automatically divide by 1000 all numbers entered in a range?

Fabulist

Board Regular
Joined
Jan 28, 2014
Messages
107
Hello everyone,

Would it be possible to automatically divide by 1000 all numbers entered in a range, for example all numbers entered from cell A1 to G25 will be transformed to =Number/1000?

Thank you in advance.
 
Well your macro divides everything typed in by 1000 and pastes the result. If you type 500 it will return 0.5 and if you highlight the cell it will report 0.5.

Is it possible that the cells report =500/1000 instead of 0.5?
See my post #8.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
The cell value will be whatever was input divided by 1000 (done by the macro).
The cell display will show based on (say) 1600 input : 1.600/1000 (the cell value will be 1.6)
 
Upvote 0
Your macro transforms numbers to this:
OpeN0ab.png


I want it to show, if able, this:
YGoDQxN.png
 
Upvote 0
Format the cells per post #8
 
Last edited:
Upvote 0
This changes how the cell appears to me, not what I see when I click on it, I want the inside of the cell to change not just its appearance - am I not understanding something?
 
Upvote 0
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, cel As Range
Set rng = Intersect(Target, [A1:G25])
If Not rng Is Nothing Then
    Application.EnableEvents = False
    For Each cel In rng
        If cel <> "" Then cel.Formula = "=" & cel & "/1000"
    Next
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,755
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top