![]() |
How to calculate multiple conditions?
Hi everyone,
This is a fairly new concept to me so I hope you can help. I have 3 columns of data, a sample is below and I wish to work out something similar to this: if Column A = Success AND B = Success AND C=Success then Make column D say "<25 Days" if Column A = Failure AND B=Success AND C = Success then make column D say "<35 Days" if Column A - Failure AND B = Failure AND C = Success then make column D say "<45 Days" Each of the results in columns A to C are calculated from IF statements from a field further up in my spreadsheet, I'm just trying to work out the time between 2 days and bunch them together into 3 groups. Do you also think there might be an easier way to work out columns A,B and C in the first place? My only concern and why I feel the date to do soMEthing similar to the above is because if I just say if A = Success or if B = Success then potentially the same line could appear in each of the 3 sections (if column A, B and C all say Success) By themselves each line will say something like this but don't know how to tag all 3 together: =IF(AND(AP2="Failure",AQ2="Failure",AR2="Success") ,"25 Days Plus","Open") Not Planned but Resolved within 25 Days / Not Planned but Resolved within 35 Days / Not Planned but Resolved within 45 Days Failure Failure Failure Failure Failure Failure Success Success Success Success Success Success Failure Success Success Success Success Success Failure Failure Failure Success Success Success Failure Failure Success Success Success Success Failure Failure Failure |
How to calculate multiple conditions?
I have 3
columns of data, a sample is below and I wish to work out something similar to this: if Column A = Success AND B = Success AND C=Success then Make column D say "<25 Days" if Column A = Failure AND B=Success AND C = Success then make column D say "<35 Days" if Column A - Failure AND B = Failure AND C = Success then make column D say "<45 Days" By themselves each line will say something like this but don't know how to tag all 3 together: =IF(AND(AP2="Failure",AQ2="Failure",AR2="Success") ,"25 Days Plus","Open") Rather than use a logical expression with individual cells, you could concatenate the three: AP2 & AQ2 & AR2 Then you could use VLOOKUP(AP2 & AQ2 & AR2, ... ) to choose the result from a table. There are only 8 possibilities. |
How to calculate multiple conditions?
"D4WNO" wrote:
I wish to work out something similar to this: if Column A = Success AND B = Success AND C=Success then Make column D say "<25 Days" if Column A = Failure AND B=Success AND C = Success then make column D say "<35 Days" if Column A - Failure AND B = Failure AND C = Success then make column D say "<45 Days" [....] By themselves each line will say something like this but don't know how to tag all 3 together: =IF(AND(AP2="Failure",AQ2="Failure",AR2="Success") , "25 Days Plus","Open") First you say the data are in columns A, B and C. But based on your example, they are in columns AP, AQ and AR. First you say you want the results to be "<25 Days", "<35 Days" and "<45 Days". But the results in your example are "25 Days Plus" or "Open" -- incomplete, but obviously very different. Finally, you give no indication of what you want when none of those 3 conditions is met. Maybe "Open"? So I don't really know what you need. If the following does not do what you require, please clarify your requirements. =IF(AND(AQ2="Success",AR2="Success"), IF(AP2="Success","<25 Days","<35 Days"), IF(AND(AP2="Failure",AQ2="Failure",AR2="Success"), "<45 Days","Open")) Caveat: The middle IF expression assumes that AP2 is either "Success" or "Failure". If it might something else (e.g. empty) and you want to treat that as "Open", then write: =IF(AND(AQ2="Success",AR2="Success"), IF(AP2="Success","<25 Days",IF(AP2="Failure","<35 Days","Open")), IF(AND(AP2="Failure",AQ2="Failure",AR2="Success"), "<45 Days","Open")) |
Quote:
|
All times are GMT +1. The time now is 11:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com