Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Format a Range to Multiply by 1000

I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the zeros.
For example, I want to be able to type 749.1 and have 749100 appear in the
cell. I know how to do this for just one cell but I cannot figure out how to do
this for a range of cells. Specifically, I want this to be applied to all the cells in
columns F-H.

Any suggestions?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Format a Range to Multiply by 1000

ToolsOptionsEdit.

Checkmark Fixed Decimal Places and set to -3(minus 3)

Note: this is a global setting and may not be suitable.

In that case you may want to use worksheet event code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Alt + q to return to Excel.

Start entering numbers.


Gord



On Thu, 16 Feb 2012 22:51:41 +0000, REReed
wrote:


I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the
zeros.
For example, I want to be able to type 749.1 and have 749100 appear in
the
cell. I know how to do this for just one cell but I cannot figure out
how to do
this for a range of cells. Specifically, I want this to be applied to
all the cells in
columns F-H.

Any suggestions?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Format a Range to Multiply by 1000

Another way is to use Paste Special...
Enter the numbers without the 3 trailing zeros.
Enter 1000 in a separate cell, away from the data, and copy it.
Select your data and then choose Paste Special from the Edit menu and then select Multiply.
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(Formats & Styles xl add-in: lists/removes unused styles & number formats) - free




"REReed"
wrote in message
...

I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the
zeros.
For example, I want to be able to type 749.1 and have 749100 appear in
the
cell. I know how to do this for just one cell but I cannot figure out
how to do
this for a range of cells. Specifically, I want this to be applied to
all the cells in
columns F-H.

Any suggestions?
Thanks




--
REReed



  #4   Report Post  
Junior Member
 
Posts: 3
Default

This macro works perfect, thanks.

Is there anyway to have a blank cell appear after
a value has been deleted rather than a zero?


Quote:
Originally Posted by Gord Dibben[_2_] View Post
ToolsOptionsEdit.

Checkmark Fixed Decimal Places and set to -3(minus 3)

Note: this is a global setting and may not be suitable.

In that case you may want to use worksheet event code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Alt + q to return to Excel.

Start entering numbers.


Gord



On Thu, 16 Feb 2012 22:51:41 +0000, REReed
wrote:


I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the
zeros.
For example, I want to be able to type 749.1 and have 749100 appear in
the
cell. I know how to do this for just one cell but I cannot figure out
how to do
this for a range of cells. Specifically, I want this to be applied to
all the cells in
columns F-H.

Any suggestions?
Thanks
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Format a Range to Multiply by 1000

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) _
Or Target.Value = "" Then Exit Sub
Application.EnableEvents = False
With Target
..Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub


Gord


On Fri, 17 Feb 2012 20:59:29 +0000, REReed
wrote:


This macro works perfect, thanks.

Is there anyway to have a blank cell appear after
a value has been deleted rather than a zero?


'Gord Dibben[_2_ Wrote:
;1410297']ToolsOptionsEdit.

Checkmark Fixed Decimal Places and set to -3(minus 3)

Note: this is a global setting and may not be suitable.

In that case you may want to use worksheet event code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Alt + q to return to Excel.

Start entering numbers.


Gord



On Thu, 16 Feb 2012 22:51:41 +0000, REReed
wrote:
-

I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the
zeros.
For example, I want to be able to type 749.1 and have 749100 appear in
the
cell. I know how to do this for just one cell but I cannot figure out
how to do
this for a range of cells. Specifically, I want this to be applied to
all the cells in
columns F-H.

Any suggestions?
Thanks-



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Format a Range to Multiply by 1000

IsNumeric is not a good test of a number.

i.e. '123 is seen as a number along with 123

Please change

If Not IsNumeric(Target.Value) _
Or Target.Value = "" Then Exit Sub

to

If Not Application.IsNumber(Target.Value) _
Or Target.Value = "" Then Exit Sub


Thanks, Gord

On Fri, 17 Feb 2012 19:15:43 -0800, Gord Dibben
wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub

Application.EnableEvents = False
With Target
.Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub


Gord


On Fri, 17 Feb 2012 20:59:29 +0000, REReed
wrote:


This macro works perfect, thanks.

Is there anyway to have a blank cell appear after
a value has been deleted rather than a zero?


'Gord Dibben[_2_ Wrote:
;1410297']ToolsOptionsEdit.

Checkmark Fixed Decimal Places and set to -3(minus 3)

Note: this is a global setting and may not be suitable.

In that case you may want to use worksheet event code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value * 1000
End With
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Alt + q to return to Excel.

Start entering numbers.


Gord



On Thu, 16 Feb 2012 22:51:41 +0000, REReed
wrote:
-

I am trying to make a worksheet where any numerical value I type is
automatically multiplied by 1000.

I am working with lots of numbers but I do not want to type all the
zeros.
For example, I want to be able to type 749.1 and have 749100 appear in
the
cell. I know how to do this for just one cell but I cannot figure out
how to do
this for a range of cells. Specifically, I want this to be applied to
all the cells in
columns F-H.

Any suggestions?
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
Multiply an entire spreadsheet by 1000 without going into ea cell Jacham Excel Worksheet Functions 4 April 9th 23 12:46 PM
Multiply/ Round by 1000 Vix Excel Discussion (Misc queries) 3 December 21st 06 05:07 PM
Format number / 1000 Jac Tremblay[_4_] Excel Programming 4 July 24th 06 05:33 PM
Format numbers in multiples of 1000 KopRed Excel Worksheet Functions 2 February 13th 06 01:52 AM
multiply A by 1000 record results in B Mother Goose Excel Worksheet Functions 3 January 25th 06 08:36 PM


All times are GMT +1. The time now is 05:48 PM.

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

About Us

"It's about Microsoft Excel"