A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Percentage function



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2008, 11:23 PM posted to microsoft.public.excel.worksheet.functions
Rachel Bixby
external usenet poster
 
Posts: 1
Default Percentage function

I am trying to create a document that if you enter a number into a certain
cell the same cell will auto-populate with what 4% is of the # you entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course be 40

Can someone please explain to me how to get the formula right and where all
of the information should be entered? Thanks in advance !

  #3  
Old January 7th, 2008, 11:35 PM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default Percentage function

Perhaps better to use an adjacent column for this?
Assume source numbers will be entered in A2 down
Input the percentage in B1, eg: 4%
Then put in B2:=IF(A2="","",A2*B$1)
Copy down as far as required
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rachel Bixby" wrote:
I am trying to create a document that if you enter a number into a certain
cell the same cell will auto-populate with what 4% is of the # you entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course be 40

Can someone please explain to me how to get the formula right and where all
of the information should be entered? Thanks in advance !

  #4  
Old January 7th, 2008, 11:43 PM posted to microsoft.public.excel.worksheet.functions
Tyro[_2_]
external usenet poster
 
Posts: 1,104
Default Percentage function

You cannot enter data into a cell and have a calculation done that changes
that cell. Formulas in Excel change other cells. You cannot have a formula
in a cell and enter data into the same cell. The data would replace the
formula.

Tyro

"Rachel Bixby" Rachel wrote in message
...
I am trying to create a document that if you enter a number into a certain
cell the same cell will auto-populate with what 4% is of the # you
entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course be
40

Can someone please explain to me how to get the formula right and where
all
of the information should be entered? Thanks in advance !



  #5  
Old January 7th, 2008, 11:58 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Percentage function

You could use event code to change the value when you enter it but then you have
no "paper trail" for error-checking.

I like Max's idea of a helper column so's you can see and make corrections if
needed.

If you want the change-in-cell event code for interest, here it is.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
If .Value "" Then
.Value = .Value * 0.04
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that sheet module.

Adjust range to suit.


Gord Dibben MS Excel MVP

On Mon, 7 Jan 2008 15:23:01 -0800, Rachel Bixby Rachel
wrote:

I am trying to create a document that if you enter a number into a certain
cell the same cell will auto-populate with what 4% is of the # you entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course be 40

Can someone please explain to me how to get the formula right and where all
of the information should be entered? Thanks in advance !


  #6  
Old January 8th, 2008, 09:46 AM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
Default Percentage function

An alternative, if you want the new number in A1, is to put the 4% in a
spare cell, copy, then select A1 (and any other cells you want multiplying),
and edit/ paste special/ multiply. You can now delete the 4% from the spare
cell if you wish to.
--
David Biddulph

"Tyro" wrote in message
...
In cell A1 enter: 1000 In cell B1 enter: =A1*4%

Tyro

"Rachel Bixby" Rachel wrote in message
...
I am trying to create a document that if you enter a number into a certain
cell the same cell will auto-populate with what 4% is of the # you
entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course be
40

Can someone please explain to me how to get the formula right and where
all
of the information should be entered? Thanks in advance !





  #7  
Old January 8th, 2008, 03:41 PM posted to microsoft.public.excel.worksheet.functions
Tyro[_2_]
external usenet poster
 
Posts: 1,104
Default Percentage function

That works well if you want to change a lot of cells. I thought the OP
wanted to know the formula to compute 4% of something.

"David Biddulph" groups [at] biddulph.org.uk wrote in message
...
An alternative, if you want the new number in A1, is to put the 4% in a
spare cell, copy, then select A1 (and any other cells you want
multiplying), and edit/ paste special/ multiply. You can now delete the
4% from the spare cell if you wish to.
--
David Biddulph

"Tyro" wrote in message
...
In cell A1 enter: 1000 In cell B1 enter: =A1*4%

Tyro

"Rachel Bixby" Rachel wrote in message
...
I am trying to create a document that if you enter a number into a
certain
cell the same cell will auto-populate with what 4% is of the # you
entered.

Example:
1) Enter 1,000 into cell
2) The same cell auto populates with 4% of 1,000 which would of course
be 40

Can someone please explain to me how to get the formula right and where
all
of the information should be entered? Thanks in advance !







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.