Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmc1104
 
Posts: n/a
Default IF function, i think??? please help.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default IF function, i think??? please help.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default IF function, i think??? please help.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmc1104
 
Posts: n/a
Default IF function, i think??? please help.

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default IF function, i think??? please help.

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
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
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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