Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think i need to use the IF function here, but i'm not sure. Here's what
I'm trying to do. If cell A1 and B1 ARE coded with "P" or "PD" assign a value of "1" in C1. If cell A1 IS NOT coded with "P" or "PD" and B1 IS coded with "P" or "PD" assign a value of "2" in C1. If cell A1 IS coded with "P" or "PD" and B1 IS NOT coded with "P" or "PD" assign a value of "3" in C1. If cell A1 and B1 ARE NOT coded with "P" or "PD" assign a value of "4" in C1. I hope someone can help. Example spreadsheet is below: Column A Column B Column C P PD L P PD M T T |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try
=IF(OR(A1="P",A1="PD"),IF(OR(B1="P",B1="PD" ),1,3),IF(OR(B1="P",B1="PD" ),2,4)) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "nmc1104" wrote in message ... I think i need to use the IF function here, but i'm not sure. Here's what I'm trying to do. If cell A1 and B1 ARE coded with "P" or "PD" assign a value of "1" in C1. If cell A1 IS NOT coded with "P" or "PD" and B1 IS coded with "P" or "PD" assign a value of "2" in C1. If cell A1 IS coded with "P" or "PD" and B1 IS NOT coded with "P" or "PD" assign a value of "3" in C1. If cell A1 and B1 ARE NOT coded with "P" or "PD" assign a value of "4" in C1. I hope someone can help. Example spreadsheet is below: Column A Column B Column C P PD L P PD M T T |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=IF(AND(OR(A1={"PD","P"}),OR(B1={"PD","P"})),1,IF( AND(AND(A1<{"PD","P"}),OR(B1={"PD","P"})),2,IF(AN D(OR(A1={"PD","P"}),AND(B1<{"PD","P"})),3,4))) HTH, Elkar "nmc1104" wrote: I think i need to use the IF function here, but i'm not sure. Here's what I'm trying to do. If cell A1 and B1 ARE coded with "P" or "PD" assign a value of "1" in C1. If cell A1 IS NOT coded with "P" or "PD" and B1 IS coded with "P" or "PD" assign a value of "2" in C1. If cell A1 IS coded with "P" or "PD" and B1 IS NOT coded with "P" or "PD" assign a value of "3" in C1. If cell A1 and B1 ARE NOT coded with "P" or "PD" assign a value of "4" in C1. I hope someone can help. Example spreadsheet is below: Column A Column B Column C P PD L P PD M T T |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Bernard and Elkar....You are MASTERS OF EXCEL!!!
"Elkar" wrote: Try this: =IF(AND(OR(A1={"PD","P"}),OR(B1={"PD","P"})),1,IF( AND(AND(A1<{"PD","P"}),OR(B1={"PD","P"})),2,IF(AN D(OR(A1={"PD","P"}),AND(B1<{"PD","P"})),3,4))) HTH, Elkar "nmc1104" wrote: I think i need to use the IF function here, but i'm not sure. Here's what I'm trying to do. If cell A1 and B1 ARE coded with "P" or "PD" assign a value of "1" in C1. If cell A1 IS NOT coded with "P" or "PD" and B1 IS coded with "P" or "PD" assign a value of "2" in C1. If cell A1 IS coded with "P" or "PD" and B1 IS NOT coded with "P" or "PD" assign a value of "3" in C1. If cell A1 and B1 ARE NOT coded with "P" or "PD" assign a value of "4" in C1. I hope someone can help. Example spreadsheet is below: Column A Column B Column C P PD L P PD M T T |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
But I prefer
=4-(OR(A1="P",A1="PH"))-2*OR(B1="P",P1="PH") -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "nmc1104" wrote in message ... I think i need to use the IF function here, but i'm not sure. Here's what I'm trying to do. If cell A1 and B1 ARE coded with "P" or "PD" assign a value of "1" in C1. If cell A1 IS NOT coded with "P" or "PD" and B1 IS coded with "P" or "PD" assign a value of "2" in C1. If cell A1 IS coded with "P" or "PD" and B1 IS NOT coded with "P" or "PD" assign a value of "3" in C1. If cell A1 and B1 ARE NOT coded with "P" or "PD" assign a value of "4" in C1. I hope someone can help. Example spreadsheet is below: Column A Column B Column C P PD L P PD M T T |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Custom Excel Function to Calculate Gini Coefficients | Excel Worksheet Functions | |||
Date & Time | New Users to Excel | |||
Hyperlinks using R[1]C[1] and offset function in its cell referenc | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |