compare across columns, determine result based on rules

Goyal

New Member
Joined
Jun 17, 2021
Messages
7
Office Version
  1. 365
Platform
  1. MacOS
Requirement: first identify text starting with numbers, then compare the text such as below:
- any columns which is non-zero, then in-progress
- any failed, then failed
- all passed, then passed

here are the list of values ... it's ok to re-number or remove the leading numbers:
0-N/A
0-De-scoped
0-Duplicate
1-Not Started
2-Ready for Test
3-In Progress
4-On-hold
5-Passed
6-Failed

here is the sample and expected output:
1624372050371.png


Many thx for your support.
 

Attachments

  • 1624371821362.png
    1624371821362.png
    1.6 KB · Views: 6

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Not clear on how you have things setup. Can you explain using column and row references?
 
Upvote 0
@Goyal IF I am understanding correctly then maybe something like the below.

MRXLMAY21.xlsm
ABCDEFG
1 Status
20-N/Aabc0-De-scopedPrime0-Duplicate 
31-Not Startedcm0-De-scopedNetflix2-Ready for Test3-In Progress
43-In Progresscm0-De-scopedNetflix5-Passed3-In Progress
55-Passedabc5-PassedPrime0-N/A5-Passed
65-Passedcm5-PassedNetflix1-Not Started3-In Progress
75-Passedabc6-FailedPrime5-Passed6-Failed
check list
Cell Formulas
RangeFormula
A1A1=E1
G2:G7G2=IF(COUNTIF(A2:E2,"6-Failed")>0,"6-Failed", IF(SUMPRODUCT(--(LEFT(A2:E2,1)="0"))=SUMPRODUCT((ISNUMBER(--LEFT(A2:E2,1))=TRUE)*1),"", IF(COUNTIF(A2:E2,"5-Passed")=SUMPRODUCT((ISNUMBER(--LEFT(A2:E2,1))=TRUE)*1)-SUMPRODUCT(--(LEFT(A2:E2,1)="0")),"5-Passed", "3-In Progress")))


If you have a large data set and processing is slow then you could maybe shorten the formula by use of helper columnss.
Hope that helps.
 
Upvote 0
@Snakehips

this is great, almost does the trick. I have one more addition (sorry).... if everything is "Not Started", it needs to return "Not Started"
 
Upvote 0
@Snakehips

this is great, almost does the trick. I have one more addition (sorry).... if everything is "Not Started", it needs to return "Not Started"
Pleased it helped.
Try this for that added result.

MRXLMAY21.xlsm
ABCDEFG
1 Status
20-N/Aabc0-De-scopedPrime0-Duplicate 
31-Not Startedcm0-De-scopedNetflix2-Ready for Test3-In Progress
43-In Progresscm0-De-scopedNetflix5-Passed3-In Progress
55-Passedabc5-PassedPrime0-N/A5-Passed
65-Passedcm5-PassedNetflix1-Not Started3-In Progress
75-Passedabc6-FailedPrime5-Passed6-Failed
81-Not Startedcm1-Not StartedNetflix1-Not StartedNot Started
check list
Cell Formulas
RangeFormula
A1A1=E1
G2:G8G2=IF(COUNTIF(A2:E2,"6-Failed")>0,"6-Failed", IF(SUMPRODUCT(--(LEFT(A2:E2,1)="0"))=SUMPRODUCT((ISNUMBER(--LEFT(A2:E2,1))=TRUE)*1),"", IF(COUNTIF(A2:E2,"5-Passed")=SUMPRODUCT((ISNUMBER(--LEFT(A2:E2,1))=TRUE)*1)-SUMPRODUCT(--(LEFT(A2:E2,1)="0")),"5-Passed", IF(COUNTIF(A2:E2,"1-Not Started")=SUMPRODUCT((ISNUMBER(--LEFT(A2:E2,1))=TRUE)*1)-SUMPRODUCT(--(LEFT(A2:E2,1)="0")),"Not Started", "3-In Progress"))))


I see that you are using Excel 365. You should perhaps be able to use the LET function to avoid the repetition of a couple of the repeat expressions in my formula, if you wish?

Edit **. Ignore the silly formula in A1, it's just a stray.
 
Upvote 0
thx, it worked fine. I am not aware on the usage of LET function.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top