Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default I need a cell to equal have of what I put in

how do I make a cell equal half of whatever $ amount I put in?
If I type in 23.50 (Accounting format) I want it to say $11.75
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default I need a cell to equal have of what I put in

You can scale either a single cell or a range of cells ( column, row,
whatever). In an unused cell enter
..5
and copy this cell. Then select the cells you want to adjust and
paste/special with multiply checked.
--
Gary's Student
gsnu200712


"lili" wrote:

how do I make a cell equal half of whatever $ amount I put in?
If I type in 23.50 (Accounting format) I want it to say $11.75

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default I need a cell to equal have of what I put in

=A1/2

"lili" wrote:

how do I make a cell equal half of whatever $ amount I put in?
If I type in 23.50 (Accounting format) I want it to say $11.75

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default I need a cell to equal have of what I put in

To do this automatically would require an event macro:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const cdSCALE As Double = 0.5 'change to suit
With Target
If .Count = 1 Then
If .Address(False, False) = "E5" Then 'change E5 to suit
On Error Resume Next
Application.EnableEvents = False
.Value = Application.Round(.Value * cdSCALE, 2)
Application.EnableEvents = True
End If
End If
End With
End Sub

I used Round() since you're talking about currency. If you want
half-pennies, use

.Value = .Value * cdSCALE

instead.


Note that format of cells (other than Text) doesn't affect how inputs
are parsed or stored.

In article ,
lili wrote:

how do I make a cell equal half of whatever $ amount I put in?
If I type in 23.50 (Accounting format) I want it to say $11.75

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
can I make cell "yes" equal 1, "no" equal 0 can I make cell yes equal 1, no equa Excel Discussion (Misc queries) 4 April 22nd 23 06:09 AM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
Setting a cell equal to another worksheet cell fails (sometimes) Richard Excel Worksheet Functions 2 March 10th 06 04:11 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 7th 04 10:50 PM


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