Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Function or formula ?

I have a cell D17 that is formatted tog give an answer when A4 is divided by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4. I
would like the 3 to stay in P4. I will from time to time put a 1 in P4 but I
do not want the 1 to change anything.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Function or formula ?

Hi,
I don;'t completely understand, if you put 1 in P4 you want D17 divided by
1.73 ?
to have D17 divided by 1.73 when 3 is entered use

=if(P4=3,D17/3)

the above formula will give you False if value in P4 is not 3

if this helps please click yes thanks

"tarheelrooster" wrote:

I have a cell D17 that is formatted tog give an answer when A4 is divided by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4. I
would like the 3 to stay in P4. I will from time to time put a 1 in P4 but I
do not want the 1 to change anything.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Function or formula ?

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "P4" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
If Target.Value = 3 Then

Me.Range("D17").Value = Me.Range("D17").Value / 1.73
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--
__________________________________
HTH

Bob

"tarheelrooster" wrote in message
...
I have a cell D17 that is formatted tog give an answer when A4 is divided
by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4.
I
would like the 3 to stay in P4. I will from time to time put a 1 in P4
but I
do not want the 1 to change anything.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Function or formula ?

If P4 will only have the values of 1 or 3

then simply change the formula of (A4/N4) to (A4/N4)/P4. When you divide
anything by one - you still get the original number - otherwise you will get
the number divided by three.

However if P4 can be blank - an easy fix would be to change the revised
equation above to (A4/N4)/if(P4=3,3,1)

--
Wag more, bark less


"tarheelrooster" wrote:

I have a cell D17 that is formatted tog give an answer when A4 is divided by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4. I
would like the 3 to stay in P4. I will from time to time put a 1 in P4 but I
do not want the 1 to change anything.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Function or formula ?

"tarheelrooster" wrote:
I have a cell D17 that is formatted tog give an answer when A4 is divided
by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4.
I
would like the 3 to stay in P4. I will from time to time put a 1 in P4
but I
do not want the 1 to change anything.


=if(P4 = 3, D17 / 1.73, D17)



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Function or formula ?

One small correction to my formula
(A4/N4)/if(P4=3,3,1)
should be
(A4/N4)/if(P4=3,1.73,1)

--
Wag more, bark less


"Brad" wrote:

If P4 will only have the values of 1 or 3

then simply change the formula of (A4/N4) to (A4/N4)/P4. When you divide
anything by one - you still get the original number - otherwise you will get
the number divided by three.

However if P4 can be blank - an easy fix would be to change the revised
equation above to (A4/N4)/if(P4=3,3,1)

--
Wag more, bark less


"tarheelrooster" wrote:

I have a cell D17 that is formatted tog give an answer when A4 is divided by
N4. I want to divide the answer of D17 by 1.73 when I put a 3 in cell P4. I
would like the 3 to stay in P4. I will from time to time put a 1 in P4 but I
do not want the 1 to change anything.

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
Function or formula to use yguan Excel Worksheet Functions 2 January 12th 09 10:59 AM
Help with OR function in IF function formula veggies27 Excel Worksheet Functions 3 March 18th 08 10:04 PM
formula using IF function bronxbabe Excel Worksheet Functions 3 February 13th 08 04:15 PM
A formula/function to return a formula/function sith janitor Excel Worksheet Functions 4 September 22nd 06 05:01 PM
A formula for an OR function Susan Excel Worksheet Functions 5 March 22nd 06 09:00 PM


All times are GMT +1. The time now is 11:16 AM.

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"