Home |
Search |
Today's Posts |
#1
|
|||
|
|||
IF function?
I read a post below about using the "if" function for multiple calculations
inside of 1 formula, but I did not quite understand your responses. My issue is taking 13 values from say cell "L3" and multiplying that value by a specified formula: =IF(L3=4,D3+50,IF(L3=6,D3*1.5+50,IF(L3=8,D3*2+50,I F(L3=10,D3*2.5+50,IF(L3=12,D3*3+50,IF(L3=14,D3*3.5 +50,IF(L3=16,D3*4+50,IF(L3=18,D3*4.5+50,)))))))) Problem being I have 5 more values to add 20,22,24,26,28 how do I do this? It appeared to me that I needed to incorporate the "or" function but when I did this it returned an error. Thanks in advance |
#2
|
|||
|
|||
=IF(AND(L3=4,L3<=28,MOD(L3,2)=0),50+(D3*L3/4),"ERROR")
-- Vasant "Murph" wrote in message ... I read a post below about using the "if" function for multiple calculations inside of 1 formula, but I did not quite understand your responses. My issue is taking 13 values from say cell "L3" and multiplying that value by a specified formula: =IF(L3=4,D3+50,IF(L3=6,D3*1.5+50,IF(L3=8,D3*2+50,I F(L3=10,D3*2.5+50,IF(L3=12 ,D3*3+50,IF(L3=14,D3*3.5+50,IF(L3=16,D3*4+50,IF(L3 =18,D3*4.5+50,)))))))) Problem being I have 5 more values to add 20,22,24,26,28 how do I do this? It appeared to me that I needed to incorporate the "or" function but when I did this it returned an error. Thanks in advance |
#3
|
|||
|
|||
what does the "mod" function do in this formula? the rest I understand.
"Vasant Nanavati" wrote: =IF(AND(L3=4,L3<=28,MOD(L3,2)=0),50+(D3*L3/4),"ERROR") -- Vasant "Murph" wrote in message ... I read a post below about using the "if" function for multiple calculations inside of 1 formula, but I did not quite understand your responses. My issue is taking 13 values from say cell "L3" and multiplying that value by a specified formula: =IF(L3=4,D3+50,IF(L3=6,D3*1.5+50,IF(L3=8,D3*2+50,I F(L3=10,D3*2.5+50,IF(L3=12 ,D3*3+50,IF(L3=14,D3*3.5+50,IF(L3=16,D3*4+50,IF(L3 =18,D3*4.5+50,)))))))) Problem being I have 5 more values to add 20,22,24,26,28 how do I do this? It appeared to me that I needed to incorporate the "or" function but when I did this it returned an error. Thanks in advance |
#4
|
|||
|
|||
Did you look it up in XL Help? It's description is pretty good...
MOD divides the first argument by the second argument and returns the remainder. In article , "Murph" wrote: what does the "mod" function do in this formula? the rest I understand. |
#5
|
|||
|
|||
In this particular case, it ensures that L3 is an even number.
-- Vasant "Murph" wrote in message ... what does the "mod" function do in this formula? the rest I understand. "Vasant Nanavati" wrote: =IF(AND(L3=4,L3<=28,MOD(L3,2)=0),50+(D3*L3/4),"ERROR") -- Vasant "Murph" wrote in message ... I read a post below about using the "if" function for multiple calculations inside of 1 formula, but I did not quite understand your responses. My issue is taking 13 values from say cell "L3" and multiplying that value by a specified formula: =IF(L3=4,D3+50,IF(L3=6,D3*1.5+50,IF(L3=8,D3*2+50,I F(L3=10,D3*2.5+50,IF(L3=12 ,D3*3+50,IF(L3=14,D3*3.5+50,IF(L3=16,D3*4+50,IF(L3 =18,D3*4.5+50,)))))))) Problem being I have 5 more values to add 20,22,24,26,28 how do I do this? It appeared to me that I needed to incorporate the "or" function but when I did this it returned an error. Thanks in advance |
#6
|
|||
|
|||
okay with that being said, what exactly is it doing in this formula?
"JE McGimpsey" wrote: Did you look it up in XL Help? It's description is pretty good... MOD divides the first argument by the second argument and returns the remainder. In article , "Murph" wrote: what does the "mod" function do in this formula? the rest I understand. |
#7
|
|||
|
|||
it looks like you could use
=50+D3*L3/4 for this calculation "Murph" wrote: I read a post below about using the "if" function for multiple calculations inside of 1 formula, but I did not quite understand your responses. My issue is taking 13 values from say cell "L3" and multiplying that value by a specified formula: =IF(L3=4,D3+50,IF(L3=6,D3*1.5+50,IF(L3=8,D3*2+50,I F(L3=10,D3*2.5+50,IF(L3=12,D3*3+50,IF(L3=14,D3*3.5 +50,IF(L3=16,D3*4+50,IF(L3=18,D3*4.5+50,)))))))) Problem being I have 5 more values to add 20,22,24,26,28 how do I do this? It appeared to me that I needed to incorporate the "or" function but when I did this it returned an error. Thanks in advance |
#8
|
|||
|
|||
It returns the remainder of L3 divided by 2.
Going beyond what MOD() is doing, that result is then compared to zero, returning a TRUE/FALSE result. TRUE would indicate that the value of L3 is both integral and even. FALSE would indicate that it is not integral and even. That result is an input to the AND() function. If L3 is not integral and even, the AND() function will return FALSE, and the result of the False branch of the IF statement (i.e., "ERROR") will be returned to the cell. In article , "Murph" wrote: okay with that being said, what exactly is it doing in this formula? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
clock | Excel Worksheet Functions | |||
Function Won't Calculate -- Sometimes | Excel Discussion (Misc queries) | |||
Need a ISWorkday Function -- Any Ideas | Excel Worksheet Functions | |||
Hyperlinks using R[1]C[1] and offset function in its cell referenc | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions |