Home |
Search |
Today's Posts |
#1
|
|||
|
|||
If Command
How do I use a "IF" comaand. I have a value for instance in A1 and a value in
A2. If the value increases in A1 by more than 20 I need to add another value from A3 to A2 and get a total in B1. If over 40 I need to add A3 again etc.. Any help would be good. |
#2
|
|||
|
|||
A2. If the value increases in A1 by more than 20
If you mean that there is some arbitrary value in A1 and if this arbitrary value increases by 20 then you will need VBA event code to do this because otherwise you will get a circular reference error because you will be trying to refer to the previous value in A1 and the present value in A1. If you mean when the value in A1 increases TO more than 20 then in B1 try: =IF(A1<"",A2+INT(A1/20)*A3,"") -- HTH Sandy Replace@mailinator with @tiscali.co.uk "MCrum" wrote in message ... How do I use a "IF" comaand. I have a value for instance in A1 and a value in A2. If the value increases in A1 by more than 20 I need to add another value from A3 to A2 and get a total in B1. If over 40 I need to add A3 again etc.. Any help would be good. |
#3
|
|||
|
|||
OK I got it to work with this formula. Now I need it to be =40, =60, etc. I
keep cetting a "Value" in cell This works =IF(C5=20,SUM(B39*2),B39) I thought it s/b like this but it does not work =IF(C5=20,SUM(B39*2),B39),IF(C5=40,SUM(B39*3),B3 9),IF(C5=60,SUM(B39*4),B39))) "MCrum" wrote: How do I use a "IF" comaand. I have a value for instance in A1 and a value in A2. If the value increases in A1 by more than 20 I need to add another value from A3 to A2 and get a total in B1. If over 40 I need to add A3 again etc.. Any help would be good. |
#4
|
|||
|
|||
Try this:
=IF(C5=60,B39*4,IF(C5=40,B39*3,IF(C5=20,B39*2,B 39))) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "MCrum" wrote in message ... OK I got it to work with this formula. Now I need it to be =40, =60, etc. I keep cetting a "Value" in cell This works =IF(C5=20,SUM(B39*2),B39) I thought it s/b like this but it does not work =IF(C5=20,SUM(B39*2),B39),IF(C5=40,SUM(B39*3),B3 9),IF(C5=60,SUM(B39*4),B3 9))) "MCrum" wrote: How do I use a "IF" comaand. I have a value for instance in A1 and a value in A2. If the value increases in A1 by more than 20 I need to add another value from A3 to A2 and get a total in B1. If over 40 I need to add A3 again etc.. Any help would be good. |
#5
|
|||
|
|||
Ragdyer" wrote in message
... Try this: =IF(C5=60,B39*4,IF(C5=40,B39*3,IF(C5=20,B39*2,B 39))) =MIN(INT(C5/20)+1,4)*B39 Seems to return the same results -- Regards Sandy Replace@mailinator with @tiscali.co.uk " |
#6
|
|||
|
|||
Worked Great. Thanks So Much
"Ragdyer" wrote: Try this: =IF(C5=60,B39*4,IF(C5=40,B39*3,IF(C5=20,B39*2,B 39))) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "MCrum" wrote in message ... OK I got it to work with this formula. Now I need it to be =40, =60, etc. I keep cetting a "Value" in cell This works =IF(C5=20,SUM(B39*2),B39) I thought it s/b like this but it does not work =IF(C5=20,SUM(B39*2),B39),IF(C5=40,SUM(B39*3),B3 9),IF(C5=60,SUM(B39*4),B3 9))) "MCrum" wrote: How do I use a "IF" comaand. I have a value for instance in A1 and a value in A2. If the value increases in A1 by more than 20 I need to add another value from A3 to A2 and get a total in B1. If over 40 I need to add A3 again etc.. Any help would be good. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extract Command in Excel 1 | Excel Discussion (Misc queries) | |||
Why do Command Buttons get stacked after print preview? | New Users to Excel | |||
Help requested for an Excel Toolbar command | Excel Discussion (Misc queries) | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) | |||
command button in excel will move when print. | Excel Discussion (Misc queries) |