Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Nested If/and statement

Hi, I would like to be able to return some text based on the numbers compared
in 2 cells v another 2 cells i.e.

if N16 N15 and M16 < M15, "No change", if N16 = N15 and M16 < M15 "No
Change", if N16 = N15 and M16 = M15 "Increase", if N16 = N15 and M16 M15
"Calsurp", if N16 < N15 and M16 < M15 "Inccal", if N16 < N15 and M16 =M15
"Skip", if N16 n15 and m16 = m15 "incrcal", if n16 n15 and m16 m15
"Incrcal calsurp"

Any help with the above would be grately appreciated, thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Nested If/and statement

Easiest in this sort of case to avoid the AND function and test column N as
the outer loop of the test, then for each column N condition have an inner
loop with the 3 choices for column M, hence something like:
=IF(N16N15,IF(M16<M15,"No change",IF(M16=M15,"incrcal","Incrcal
cslsurp")),IF(N16=N15,IF(M16<M15,"No Change",IF(M16=M15,...
and complete as appropriate.
--
David Biddulph

"ScoobyDoo" wrote in message
...
Hi, I would like to be able to return some text based on the numbers
compared
in 2 cells v another 2 cells i.e.

if N16 N15 and M16 < M15, "No change", if N16 = N15 and M16 < M15 "No
Change", if N16 = N15 and M16 = M15 "Increase", if N16 = N15 and M16 M15
"Calsurp", if N16 < N15 and M16 < M15 "Inccal", if N16 < N15 and M16 =M15
"Skip", if N16 n15 and m16 = m15 "incrcal", if n16 n15 and m16 m15
"Incrcal calsurp"

Any help with the above would be grately appreciated, thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Nested If/and statement

Here is a different approach which should do what you want...

=IF(COUNT(N15,N16,M15,M16)=4,CHOOSE(3*SIGN(N16-N15)+SIGN(M16-M15)+5,"Incal","Skip","Skip","No
change","Increase","Calsurp","No change","Incrcal","Incral calsurp"),"")

Rick


"ScoobyDoo" wrote in message
...
Hi, I would like to be able to return some text based on the numbers
compared
in 2 cells v another 2 cells i.e.

if N16 N15 and M16 < M15, "No change", if N16 = N15 and M16 < M15 "No
Change", if N16 = N15 and M16 = M15 "Increase", if N16 = N15 and M16 M15
"Calsurp", if N16 < N15 and M16 < M15 "Inccal", if N16 < N15 and M16 =M15
"Skip", if N16 n15 and m16 = m15 "incrcal", if n16 n15 and m16 m15
"Incrcal calsurp"

Any help with the above would be grately appreciated, thanks in advance


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
NESTED IF STATEMENT SSJ New Users to Excel 4 January 16th 08 08:21 PM
Nested IF/OR/AND Statement Help Gayla Excel Worksheet Functions 3 June 22nd 07 04:27 AM
IF STATEMENT - NESTED tojo107 Excel Worksheet Functions 4 April 19th 07 08:14 PM
Nested IF/AND Statement buffgirl71 Excel Discussion (Misc queries) 1 October 10th 06 01:59 AM
Nested If Statement guilbj2 Excel Discussion (Misc queries) 4 February 27th 06 04:01 PM


All times are GMT +1. The time now is 01:17 PM.

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"