Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default selecting an answer based on a 3 way logic

Here is a sample of the data.

Condition 1 Condition 2 Condition 3 Type
Problem A Type A
Problem B Type B
Problem C yes no
Type B
Problem C yes yes
Type B
Problem C no yes
Type C

Based on Conditions 1, 2 and 3 I want to fill out Type A, B or C in the
forth column. So the logic would be

If condition 1 = Problem A then Type A
If condition 1 = Problem B then Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = no then
Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = yes then
Type B
If condition 1 = Problem C and Condition 2=no and condition 3 = yes then
Type C
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default selecting an answer based on a 3 way logic

=IF(A2="Problem A","Type A",IF(A2="Problem B","Type B",IF(AND(A2="Problem
C",B2="Yes",OR(C2={"Yes","No"})),"Type B",IF(AND(A2="Problem
C",B2="No",C2="Yes"),"Type C","undefined"))))


"Sam B" wrote:

Here is a sample of the data.

Condition 1 Condition 2 Condition 3 Type
Problem A Type A
Problem B Type B
Problem C yes no
Type B
Problem C yes yes
Type B
Problem C no yes
Type C

Based on Conditions 1, 2 and 3 I want to fill out Type A, B or C in the
forth column. So the logic would be

If condition 1 = Problem A then Type A
If condition 1 = Problem B then Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = no then
Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = yes then
Type B
If condition 1 = Problem C and Condition 2=no and condition 3 = yes then
Type C

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default selecting an answer based on a 3 way logic

Thank you for the quick reply. I tried this and I get "undefined" for the
last three rows, instead of Type B, Type B, Type C

"Teethless mama" wrote:

=IF(A2="Problem A","Type A",IF(A2="Problem B","Type B",IF(AND(A2="Problem
C",B2="Yes",OR(C2={"Yes","No"})),"Type B",IF(AND(A2="Problem
C",B2="No",C2="Yes"),"Type C","undefined"))))


"Sam B" wrote:

Here is a sample of the data.

Condition 1 Condition 2 Condition 3 Type
Problem A Type A
Problem B Type B
Problem C yes no
Type B
Problem C yes yes
Type B
Problem C no yes
Type C

Based on Conditions 1, 2 and 3 I want to fill out Type A, B or C in the
forth column. So the logic would be

If condition 1 = Problem A then Type A
If condition 1 = Problem B then Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = no then
Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = yes then
Type B
If condition 1 = Problem C and Condition 2=no and condition 3 = yes then
Type C

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default selecting an answer based on a 3 way logic

Found the problem. It was a typo. Thank you.

"Teethless mama" wrote:

=IF(A2="Problem A","Type A",IF(A2="Problem B","Type B",IF(AND(A2="Problem
C",B2="Yes",OR(C2={"Yes","No"})),"Type B",IF(AND(A2="Problem
C",B2="No",C2="Yes"),"Type C","undefined"))))


"Sam B" wrote:

Here is a sample of the data.

Condition 1 Condition 2 Condition 3 Type
Problem A Type A
Problem B Type B
Problem C yes no
Type B
Problem C yes yes
Type B
Problem C no yes
Type C

Based on Conditions 1, 2 and 3 I want to fill out Type A, B or C in the
forth column. So the logic would be

If condition 1 = Problem A then Type A
If condition 1 = Problem B then Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = no then
Type B
If condition 1 = Problem C and Condition 2=yes and condition 3 = yes then
Type B
If condition 1 = Problem C and Condition 2=no and condition 3 = yes then
Type C

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
DISPLAY Image Based on Logic RayportingMonkey Excel Discussion (Misc queries) 5 July 25th 07 05:54 PM
Selecting A Column based on Cell Value newguy Excel Discussion (Misc queries) 0 December 14th 06 09:39 PM
change format of cells (bold, italic) based on one cell's answer Jabi Excel Discussion (Misc queries) 4 May 25th 06 12:33 PM
Selecting rows based on criteria JCP Excel Discussion (Misc queries) 3 April 5th 06 09:26 AM
Logic statement returns wrong answer. Tony Excel Worksheet Functions 2 December 2nd 04 05:07 AM


All times are GMT +1. The time now is 10:17 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"