Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combining IF statements

Hello all,

I've been unable to incorporate these two IF statements into one,

=IF('Step 1'!B710,IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA"
ROUNDUP(MAX(L15:L18), 2)*'Step 1'!D10),
IF(('Step 4'!L15 = "NA"), "NA",), IF(ISERROR(ROUNDUP(MAX(L15:L18), 2))
"NA", ROUNDUP(MAX(L15:L18), 2)))

and


=IF(('Step 4'!L15 = "NA"), "NA",)

Is there anybody out there who can help me bring these two statement
into one. They each work individually, but I can't get them together.
I continue to have trouble with the parenthesis.

If possible I'd like to also include a range of cells instead of jus
1. For example, instead of L15 is it possible to use something like:

=IF(('Step 4'!L15:L18 = "NA"), "NA",)

Thanks for any help I can ge

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Combining IF statements

Hi
you may explain in detail what you're trying to achieve. Describe in
plain text your desired logic (e.g. for your check of the range againt
'NA')

--
Regards
Frank Kabel
Frankfurt, Germany


Hello all,

I've been unable to incorporate these two IF statements into one,

=IF('Step 1'!B710,IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA",
ROUNDUP(MAX(L15:L18), 2)*'Step 1'!D10),
IF(('Step 4'!L15 = "NA"), "NA",), IF(ISERROR(ROUNDUP(MAX(L15:L18),
2)), "NA", ROUNDUP(MAX(L15:L18), 2)))

and


=IF(('Step 4'!L15 = "NA"), "NA",)

Is there anybody out there who can help me bring these two statements
into one. They each work individually, but I can't get them

together.
I continue to have trouble with the parenthesis.

If possible I'd like to also include a range of cells instead of just
1. For example, instead of L15 is it possible to use something like:

=IF(('Step 4'!L15:L18 = "NA"), "NA",)

Thanks for any help I can get


---
Message posted from http://www.ExcelForum.com/Hi

yo

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combining IF statements

Here is my Pseudo-code, in plain logic:

If on sheet (Step1) at Cell B7 is greater than 10 then
get the max value in the range L15:L18. Roundup this max value in thi
range. Then multiply this value by the value in Cell D10 on sheet Ste
1. Catch any errors by placing an NA.

If on sheet (Step1) at Cell B7 is less than 10 then get the max valu
in the range L15:L18. Roundup this max value in this range.
But do not multiply by the value in Cell D10.

As well, If any of the cells in the range from L15 to L18 contain a
"NA" enter an NA in the cell that this formula is placed. In this cas
J145.

I made a mistake in posting my code, it shouldve been integrate th
following:

=IF('Step 1'!B710,IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA"
ROUNDUP(MAX(L15:L18), 2)*'Step 1'!D10),
IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA", ROUNDUP(MAX(L15:L18), 2)))

AND

=IF(('Step 4'!L15 = "NA"), "NA")

Hope this clarifies things

Thanks a bunch

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Combining IF statements

Hi
try the following formula
=IF(COUNTIF('step1'!L15:L18,"NA")0,"NA",IF(ISERRO R(ROUNDUP(MAX(L15:L18
),2)*(1+'step1'!D10*('step1'!B710))),"NA",ROUNDUP (MAX(L15:L18),2)*(1+'
step1'!D10*('step1'!B710))))


Notes:
- I assumed that if B7=10 you also didn't want a multiplication with
cell D10 (you missed this condition in your pseudo code).
- Instead of this general ISERROR check I would restrict this to the
cells which really could contain an error. As I don't know in which
cases you could have an error in any of the referenced cells no better
solution possible
- also not sure why you used a sheet named 'step4' in your newest
example

--
Regards
Frank Kabel
Frankfurt, Germany


Here is my Pseudo-code, in plain logic:

If on sheet (Step1) at Cell B7 is greater than 10 then
get the max value in the range L15:L18. Roundup this max value in
this range. Then multiply this value by the value in Cell D10 on
sheet Step
1. Catch any errors by placing an NA.

If on sheet (Step1) at Cell B7 is less than 10 then get the max value
in the range L15:L18. Roundup this max value in this range.
But do not multiply by the value in Cell D10.

As well, If any of the cells in the range from L15 to L18 contain an
"NA" enter an NA in the cell that this formula is placed. In this
case J145.

I made a mistake in posting my code, it shouldve been integrate the
following:

=IF('Step 1'!B710,IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA",
ROUNDUP(MAX(L15:L18), 2)*'Step 1'!D10),
IF(ISERROR(ROUNDUP(MAX(L15:L18), 2)), "NA", ROUNDUP(MAX(L15:L18),

2)))

AND

=IF(('Step 4'!L15 = "NA"), "NA")

Hope this clarifies things

Thanks a bunch!


---
Message posted from http://www.ExcelForum.com/


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combining IF statements

Thanks!

It works great, I'll have to test it completly before implementing but
so far so good!

I'll take your notes into consideration as well.

Cheers!


---
Message posted from http://www.ExcelForum.com/



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combining IF statements

I've tested the code and it works fine for the range of cells (i.e
L15:L18 = "NA") that have an NA, however when the range of cells do not
have an NA the cell still yields an NA as an end result. Thus its not
completly correct.

Any suggestions???


---
Message posted from http://www.ExcelForum.com/

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
Help on combining two IF statements Sunflower[_2_] Excel Worksheet Functions 3 January 24th 10 07:59 PM
Help on combining two IF Statements Sunflower[_2_] New Users to Excel 2 January 24th 10 07:40 PM
Combining 2 IF statements Browny Excel Discussion (Misc queries) 3 October 16th 08 02:38 AM
Combining IF Statements Carl Excel Worksheet Functions 2 November 24th 06 01:20 AM
Combining IF statements Macmo Excel Worksheet Functions 2 May 5th 06 05:17 AM


All times are GMT +1. The time now is 03:54 PM.

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"