#1   Report Post  
Murph
 
Posts: n/a
Default 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   Report Post  
Vasant Nanavati
 
Posts: n/a
Default

=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   Report Post  
Murph
 
Posts: n/a
Default

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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   Report Post  
Vasant Nanavati
 
Posts: n/a
Default

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   Report Post  
Murph
 
Posts: n/a
Default

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   Report Post  
bj
 
Posts: n/a
Default

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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
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
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Function Won't Calculate -- Sometimes Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 4 April 13th 05 04:38 PM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


All times are GMT +1. The time now is 12:51 AM.

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"