Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here is a sample of the spreadsheet I'm working with:
Column A Column B Column C S LS Yes S HS No HS NS Yes HS HS No I'm trying to determine a formula I can use to automatically populate Column C with a yes or no based on the letters in columns a or b. This is just a small sample of the letters that could be used so there are multiple combinations (NA, NS, LS, S, HS are the letters). I was thinking I could just use numbers instead of letters and do an if statement but letters are preferred. What is the best way to approach this? Thanks in advance for your help. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In column C you would put something like
=IF(OR(AND(B2="HS",C2="NS"),AND(B2="S",C2="LS"))," Yes","No") In other words, if B2 contains HS and C2 contains NS, or if B2 contains S and C2 contains LS, put "Yes" in the cell, otherwise put "No". Does that help? --JP On Apr 4, 11:09*am, HJ wrote: Here is a sample of the spreadsheet I'm working with: Column A * * * * * * * Column B * * * * * * Column C S * * * * * * * * * * * * * *LS * * * * * * * * * * * *Yes S * * * * * * * * * * * * * *HS * * * * * * * * * * * *No HS * * * * * * * * * * * * *NS * * * * * * * * * * * *Yes HS * * * * * * * * * * * * *HS * * * * * * * * * * * *No I'm trying to determine a formula I can use to automatically populate Column C with a yes or no based on the letters in columns a or b. *This is just a small sample of the letters that could be used so there are multiple combinations (NA, NS, LS, S, HS are the letters). *I was thinking I could just use numbers instead of letters and do an if statement but letters are preferred. * What is the best way to approach this? Thanks in advance for your help. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Say admissible combinations a
S LS HS NS NA NS A NA etc You can put all admissible combinations in consecutive pairs of cells, e.g. F1:G1 for the first, F2:G2 for the second and so on, say until F10:G10. Then in C2: =IF(SUMPRODUCT((A2=F1:F10)*(B2=G1:G10)),"Yes","No" ) Does this help? Kostis Vezerides On Apr 4, 6:09 pm, HJ wrote: Here is a sample of the spreadsheet I'm working with: Column A Column B Column C S LS Yes S HS No HS NS Yes HS HS No I'm trying to determine a formula I can use to automatically populate Column C with a yes or no based on the letters in columns a or b. This is just a small sample of the letters that could be used so there are multiple combinations (NA, NS, LS, S, HS are the letters). I was thinking I could just use numbers instead of letters and do an if statement but letters are preferred. What is the best way to approach this? Thanks in advance for your help. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks. I ended up adding a table assigning the letters to numbers and did a
vlookup. There were just too many combinations for the IF statement. "JP" wrote: In column C you would put something like =IF(OR(AND(B2="HS",C2="NS"),AND(B2="S",C2="LS"))," Yes","No") In other words, if B2 contains HS and C2 contains NS, or if B2 contains S and C2 contains LS, put "Yes" in the cell, otherwise put "No". Does that help? --JP On Apr 4, 11:09 am, HJ wrote: Here is a sample of the spreadsheet I'm working with: Column A Column B Column C S LS Yes S HS No HS NS Yes HS HS No I'm trying to determine a formula I can use to automatically populate Column C with a yes or no based on the letters in columns a or b. This is just a small sample of the letters that could be used so there are multiple combinations (NA, NS, LS, S, HS are the letters). I was thinking I could just use numbers instead of letters and do an if statement but letters are preferred. What is the best way to approach this? Thanks in advance for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|