Need Help On Formula _ Again

ranjith2523

Board Regular
Joined
Apr 29, 2014
Messages
137
Office Version
  1. 365
Hi Friends,

I need you help to validate horizontal data with vertical data.

Hope someone will help me on this data validation.

ClientObjectChar. ValueCharacteristicMaterialPLATFORMMATERIAL_ENTITLEMENTDOC_ONLYOS_SSREQUIRED_OPTIONSValidation
900344822-B210REQUIRED_OPTIONS344822-B21XSYSTEMYNS0Passed
900344822-B21NDOC_ONLYBA369AAXSYSTEMYNS0Passed
900344822-B21SOS_SSCG369ACXSYSTEMYNS0Failed(Since MATERIAL_ENTITLEMENT is N in System)
900344822-B21XSYSTEMPLATFORMDR370AAXSYSTEMNNS0Failed(DOC_ONLY Is Missing In System)
900344822-B21YMATERIAL_ENTITLEMENT
900BA369AA0REQUIRED_OPTIONS
900BA369AAXSYSTEMPLATFORM
900BA369AANDOC_ONLY
900BA369AANTYPE_OF_REPLACEMENT
900BA369AASOS_SS
900BA369AAYMATERIAL_ENTITLEMENT
900CG369AC0REQUIRED_OPTIONS
900CG369ACXSYSTEMPLATFORM
900CG369ACNDOC_ONLY
900CG369ACNTYPE_OF_REPLACEMENT
900CG369ACSOS_SS
900CG369ACNMATERIAL_ENTITLEMENT
900DR370AA0REQUIRED_OPTIONS
900DR370AAXSYSTEMPLATFORM
900DR370AASOS_SS
900DR370AANMATERIAL_ENTITLEMENT



Let me clearly explain my requirement to avoid confusion

1 From Column F to K is the data which we received as standard request to load in system.
2 From Column B to D is the data which we download from system
3 In Column L, we need to apply FORMULA to validate the requested data is match with system.

Here the problem for us is we received the request in Horizontal Format whereas the system output will be in Vertical Format

Lets take an example, the product "344822-B21" will repeat in Column B to have the Char. Value (Column C) like 0,N,S,XYSTEM,Y.
The same product will be there in Column F with the same Char Value in single line (Range G2 to K2)
Here, the column D will have the Characteristic and the same we could see the same characteristic in Range G1 to K1
I am not sure whether I am confusing you but I just wanted to let you know that the data given in request (Column F to K) should match in system (Column B to D).

In L column I would like to apply formula to validate the data.

In my Example, the cell L2 and L3 is passed since the productS "344822-B21", "BA369AA" information from exactly match with the data which given in Column B to D
Cell L3 showing Failed since the material CG369AC is having MATERIAL_ENTITLEMENT - "N" Cell 18 (SYSTEM) where in request H4 given as "Y" for MATERIAL_ENTITLEMENT
Cell L5 also showing Failed since the material "DR370AA" is having DOC_ONLY - "N" in H5 but the Characteristic "DOC_ONLY" missing Column D for the product DR370AA

Is there any way to bring this validation in Excel FORMULA.

Thanks for all your help in advance.

Regards,
Ranjith
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Maybe something along:
Book1
GHIJKLM
1MaterialPLATFORMMATERIAL_ENTITLEMENTDOC_ONLYOS_SSREQUIRED_OPTIONSValidation
2344822-B21XSYSTEMYNS0Passed
3BA369AAXSYSTEMYNS0Passed
4CG369ACXSYSTEMNNS0Failed
5DR370AAXSYSTEMNnot availableS0Failed
ranjith2523
Cell Formulas
RangeFormula
I2:I5I2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[MATERIAL_ENTITLEMENT]]),0),0)),"not available")
J2:J5J2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[DOC_ONLY]]),0),0)),"not available")
K2:K5K2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[OS_SS]]),0),0)),"not available")
L2:L5L2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[REQUIRED_OPTIONS]]),0),0)),"not available")
 
Upvote 0
Maybe something along:
Book1
GHIJKLM
1MaterialPLATFORMMATERIAL_ENTITLEMENTDOC_ONLYOS_SSREQUIRED_OPTIONSValidation
2344822-B21XSYSTEMYNS0Passed
3BA369AAXSYSTEMYNS0Passed
4CG369ACXSYSTEMNNS0Failed
5DR370AAXSYSTEMNnot availableS0Failed
ranjith2523
Cell Formulas
RangeFormula
I2:I5I2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[MATERIAL_ENTITLEMENT]]),0),0)),"not available")
J2:J5J2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[DOC_ONLY]]),0),0)),"not available")
K2:K5K2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[OS_SS]]),0),0)),"not available")
L2:L5L2=IFERROR(INDEX(Table_client[Char. Value],MATCH(1,INDEX((Table_client[Object]=[@Material])*(Table_client[Characteristic]=Table_results[[#Headers],[REQUIRED_OPTIONS]]),0),0)),"not available")


Thank you so much for your response and hard work.

The formula which you provided is not working as expected.

I would need to apply formula in COLUMN L to compare and validate the data from COLUMN F to K to COLUMN B to D.
 
Upvote 0
Can someone provide your suggestions to achieve the validation.. If it is not possible to achieve through formula please provide your inputs to achieve this.
 
Upvote 0
Enter this as an Array formula (enter the formula in the formula bar and press Ctrl+Shift+Enter)

=IFERROR(IF(AND(INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$G$1),0))=$G2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$H$1),0))=$H2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$I$1),0))=$I2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$J$1),0))=$J2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$K$1),0))=$K2),"Passed", "Failed"),"Failed")
 
Upvote 0
Enter this as an Array formula (enter the formula in the formula bar and press Ctrl+Shift+Enter)

=IFERROR(IF(AND(INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$G$1),0))=$G2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$H$1),0))=$H2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$I$1),0))=$I2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$J$1),0))=$J2,INDEX($C$1:$C$100,MATCH(1,($B$1:$B$100=$F2)*($D$1:$D$100=$K$1),0))=$K2),"Passed", "Failed"),"Failed")



Thank you so much for your reply.

It is working as expected. I am really interested to learn formulas and help other like you, Can you provide me any suggestion where to start and how to learn it .
 
Upvote 0
Forums such as this have always been the best learning tool for me. Skim through threads if you have time to see what people are doing. Try to think of real-world use cases for the tips you find. Come back and ask for help, ask for explanations if the solutions presented work, but don't make sense.

The above formula breaks down like this - search support.office.com for details on each function

There are 5 INDEX/MATCH functions which look for the 5 Characteristic values matching to the column headers in your right hand table. See here for an explanation of how the Index Match pairing works with multiple criteria (in this case matching the value in the Object Column and the Characteristic column to return the value from the Char. Value column)

These are all in an AND function which takes a set of expressions that need to evaluate to TRUE or FALSE. If all are TRUE, the AND returns TRUE, otherwise it will return false. Research Logical functions for more info (e.g. here)

That AND function is tested in the IF function, which returns "Passed" if the AND function returns TRUE, and "Failed" if not.

Finally, that is wrapped in an IFERROR function that will return "Failed" when the IF function returns an error (in the 4th example, the DOC_ONLY characteristic is missing from the left hand data set, so the INDEX/MATCH function looking for it returns an error, which means the AND function also errors, and the IF function errors)
 
Upvote 0
Forums such as this have always been the best learning tool for me. Skim through threads if you have time to see what people are doing. Try to think of real-world use cases for the tips you find. Come back and ask for help, ask for explanations if the solutions presented work, but don't make sense.

The above formula breaks down like this - search support.office.com for details on each function

There are 5 INDEX/MATCH functions which look for the 5 Characteristic values matching to the column headers in your right hand table. See here for an explanation of how the Index Match pairing works with multiple criteria (in this case matching the value in the Object Column and the Characteristic column to return the value from the Char. Value column)

These are all in an AND function which takes a set of expressions that need to evaluate to TRUE or FALSE. If all are TRUE, the AND returns TRUE, otherwise it will return false. Research Logical functions for more info (e.g. here)

That AND function is tested in the IF function, which returns "Passed" if the AND function returns TRUE, and "Failed" if not.

Finally, that is wrapped in an IFERROR function that will return "Failed" when the IF function returns an error (in the 4th example, the DOC_ONLY characteristic is missing from the left hand data set, so the INDEX/MATCH function looking for it returns an error, which means the AND function also errors, and the IF function errors)

Thank you .. You are awesome :) Very clear explanation.. Hope i will learn soon and start helping peoples.
 
Upvote 0

Forum statistics

Threads
1,216,068
Messages
6,128,592
Members
449,460
Latest member
jgharbawi

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