Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default divide all numbers in range by a fixed number


I want to be able to type numbers into fields and have Excel
automatically divide that number by .88 in order to obtain a selling
price for our inventory.

I think I am making this a lot harder than it really is.

Any help would be greatly appreciated!!


--
dhig3903
------------------------------------------------------------------------
dhig3903's Profile: http://www.excelforum.com/member.php...o&userid=37242
View this thread: http://www.excelforum.com/showthread...hreadid=569577

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default divide all numbers in range by a fixed number

You can do it while you enter by using event code which can be copy/pasted from
here to a sheet module.

Right-click on the sheet tab and "View Code". Paste the code into that module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in any cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
n = Target.Row
If Excel.Range("A" & n).Value < "" Then
Excel.Range("A" & n).Value = Excel.Range("A" & n).Value / 0.88
End If
End If
enditall:
Application.EnableEvents = True
End Sub

Alternative...........enter all the numbers then place .88 in an empty cell and
copy that cell.

Select all the number cells and Paste SpecialDivideOKEsc.

Delete the cell with the .88


Gord Dibben MS Excel MVP

On Tue, 8 Aug 2006 15:07:06 -0400, dhig3903
wrote:


I want to be able to type numbers into fields and have Excel
automatically divide that number by .88 in order to obtain a selling
price for our inventory.

I think I am making this a lot harder than it really is.

Any help would be greatly appreciated!!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default divide all numbers in range by a fixed number

Take an empty cell... Type in "0.88"... copy... highlight all the cells that
has to be divided by this number... right click...paste special... select the
divide check box... ok

See if this works... This can be used for all operators... i.e.,
add/subtract/multiply or divide.

manoj


"dhig3903" wrote:


I want to be able to type numbers into fields and have Excel
automatically divide that number by .88 in order to obtain a selling
price for our inventory.

I think I am making this a lot harder than it really is.

Any help would be greatly appreciated!!


--
dhig3903
------------------------------------------------------------------------
dhig3903's Profile: http://www.excelforum.com/member.php...o&userid=37242
View this thread: http://www.excelforum.com/showthread...hreadid=569577


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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Avoid duplicate number entry when only start and stop numbers given. almk05 Excel Discussion (Misc queries) 1 March 26th 06 02:42 AM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 07:16 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
How to add one number to a range of numbers BatonRougeguy Excel Worksheet Functions 1 February 16th 05 07:47 AM


All times are GMT +1. The time now is 12:55 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"