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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Between" in an IF clause



 
 
Thread Tools Display Modes
  #1  
Old May 1st, 2005, 10:37 PM
gavin
external usenet poster
 
Posts: n/a
Default "Between" in an IF clause

I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which lie
between 40 and 130. How do I do that - I just can't work it out?


  #2  
Old May 1st, 2005, 10:43 PM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default

One way:

=IF(ISBLANK(AJ2),"",'Jobs (2)'!F2*IF(H240,0.682,IF(H2130,0.781,X)))

where X is your new value.





In article ,
"gavin" wrote:

I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which lie
between 40 and 130. How do I do that - I just can't work it out?

  #3  
Old May 1st, 2005, 10:47 PM
Bill Kuunders
external usenet poster
 
Posts: n/a
Default

You have already got it.
not blank, not smaller than 40 and not larger than130 ...........
i.e. in stead of "0" at the end , enter what ever factor you need.

Regards
Greetings from New Zealand
Bill K

"gavin" wrote in message
...
I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which lie
between 40 and 130. How do I do that - I just can't work it out?




  #4  
Old May 2nd, 2005, 02:21 AM
Dan Chupinsky
external usenet poster
 
Posts: n/a
Default

I believe all your needs can be met by following the procedure described in
http://www.mcgimpsey.com/excel/variablerate.html

This excellent method has solved similar problems for me.

Dan

"gavin" wrote in message
...
I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which lie
between 40 and 130. How do I do that - I just can't work it out?




  #5  
Old May 2nd, 2005, 01:14 PM
gavin
external usenet poster
 
Posts: n/a
Default

Doh! Why didn't I think of that??? That's Bill - much appreciated.


Regards,



Gavin





"Bill Kuunders" wrote in message
...
You have already got it.
not blank, not smaller than 40 and not larger than130 ...........
i.e. in stead of "0" at the end , enter what ever factor you need.

Regards
Greetings from New Zealand
Bill K

"gavin" wrote in message
...
I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which

lie
between 40 and 130. How do I do that - I just can't work it out?






  #6  
Old May 2nd, 2005, 09:27 PM
Bill Kuunders
external usenet poster
 
Posts: n/a
Default

You're welcom.
Thanks for the feedback.
Must say though that JE Mc's answer is the same.
Regards

--
Greetings from New Zealand
Bill K

"gavin" wrote in message
...
Doh! Why didn't I think of that??? That's Bill - much appreciated.


Regards,



Gavin





"Bill Kuunders" wrote in message
...
You have already got it.
not blank, not smaller than 40 and not larger than130 ...........
i.e. in stead of "0" at the end , enter what ever factor you need.

Regards
Greetings from New Zealand
Bill K

"gavin" wrote in message
...
I have the following formula which works OK:

=IF(ISBLANK(AJ2),"",IF(H240,'Jobs (2)'!F2*0.682,IF(H2130,'Jobs
(2)'!F2*0.781,"0")))

But I need to add another IF clause to account for values in H2 which

lie
between 40 and 130. How do I do that - I just can't work it out?








 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extremely slow IN clause Carl Rapson Running & Setting Up Queries 8 April 20th, 2005 11:15 PM
like clause issue... Brad Pears Setting Up & Running Reports 1 January 10th, 2005 10:52 PM
can I not put a where clause in a Transform query? Richard Hollenbeck Running & Setting Up Queries 4 December 24th, 2004 01:33 PM
Syntax error in from clause MikeC Running & Setting Up Queries 2 October 2nd, 2004 04:02 AM


All times are GMT +1. The time now is 11:44 PM.


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