Adding functionality to a formula to catch case sensitive issues

Peptide

Board Regular
Joined
Apr 12, 2016
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hello - I have the formula below but want to add ability to catch if B7 is not an exact match due to letters being lower or capital. i.e. ABcDE would not match ABCDE.

I tried to add TRUE and EXACT terminology into the formula but could not make it work or I had it wrong somehow... ugh.

Any help would be greatly appreciated!

=IFERROR(VLOOKUP(B7,'Pricing Table'!$AY$5:$BM$36,MATCH(B87,'Pricing Table'!$AY$4:$BM$4,0),FALSE),"N-Term/Mgs Combo Not Found On N-Term Data Table")
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try:

=IFERROR(INDEX('Pricing Table'!$AZ$5:$BM$36,MATCH(TRUE,EXACT(B7,'Pricing Table'!$AY$5:$AY$36),0),MATCH(B87,'Pricing Table'!$AZ$4:$BM$4,0)),"N-Term/Mgs Combo Not Found On N-Term Data Table")

and confirm it with Control+Shift+Enter.


Edit: This one doesn't require the CSE:

=IFERROR(INDEX('Pricing Table'!$AZ$5:$BM$36,LOOKUP(2,1/EXACT(B7,'Pricing Table'!$AY$5:$AY$36),ROW($AY$5:$AY$36)-ROW($AY$5)+1),MATCH(B87,'Pricing Table'!$AZ$4:$BM$4,0)),"N-Term/Mgs Combo Not Found On N-Term Data Table")
 
Last edited:
Upvote 0
Hi Eric and thanks for the reply.

I tried both options but did not get it to work so I am guessing I may not have been 100% clear - sorry :(

Example
- if it looks for B7 as ABcDE and does not find it, it replies "N-Term/Mgs Combo Not Found On N-Term Data Table"
- if it looks for B7 as ABcDE and finds ABCDE, it again replies "N-Term/Mgs Combo Not Found On N-Term Data Table"
- if it looks for B7 as ABcDE, and finds the all cap match, it does the rest of the calculation

This make sense?
 
Upvote 0
That's how I understood it. Here's my test sheet:

ABCAXAYAZBABBBCBDBE
1BA6
2BA6
3
41234567
5abcdeAZ5BA5BB5BC5BD5BE5
6ABcDEAZ6BA6BB6BC6BD6BE6
7ABcDEABcdEAZ7BA7BB7BC7BD7BE7
8abcdEAZ8BA8BB8BC8BD8BE8
9
10
86
873

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Pricing Table

Worksheet Formulas
CellFormula
B2=IFERROR(INDEX('Pricing Table'!$AZ$5:$BM$36,LOOKUP(2,1/EXACT(B7,'Pricing Table'!$AY$5:$AY$36),ROW($AY$5:$AY$36)-ROW($AY$5)+1),MATCH(B87,'Pricing Table'!$AZ$4:$BM$4,0)),"N-Term/Mgs Combo Not Found On N-Term Data Table")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
B1{=IFERROR(INDEX('Pricing Table'!$AZ$5:$BM$36,MATCH(TRUE,EXACT(B7,'Pricing Table'!$AY$5:$AY$36),0),MATCH(B87,'Pricing Table'!$AZ$4:$BM$4,0)),"N-Term/Mgs Combo Not Found On N-Term Data Table")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>




For convenience, I put the formula, parameters, and table on the same sheet. But it should be easy enough to see that it would work on different sheets. Notice that the formulas return BA6, which is the value at the intersection of the 3 column (from B87), and the ABcDE row (from B7). Notice how it skipped the "abcde" row? If you put in ABCDE in B7, it will give you the error message.

If this is not what you want, let me know. If your sheet is set up differently, let me know.
 
Upvote 0
Note I updated the last scenario..


Hi Eric and thanks for the reply.


I tried both options but did not get it to work so I am guessing I may not have been 100% clear - sorry :(

Example
- if it looks for B7 as ABcDE and does not find it, it replies "N-Term/Mgs Combo Not Found On N-Term Data Table"
- if it looks for B7 as ABcDE and finds ABCDE, it again replies "N-Term/Mgs Combo Not Found On N-Term Data Table"
- if it looks for B7 as ABcDE, and finds the all match with the small c, it does the rest of the calculation

This make sense?
 
Upvote 0
Thanks Eric,
So weird... I opened a new excel file entered it again like your example and I still get that it does not match. I did both CSE and non CSE options. I have the cells formatted as General - that make a difference?
Bob
 
Upvote 0
Hi Eric,
I have spent a bunch more time on this, I was able to duplicate on a new file but not on my real file.....oh so fun! Thx for your help. I ll keep trying!
 
Upvote 0
I'm glad you're making progress. Clearly there must be some difference between your sheet and mine, but it's very hard to say what without directly comparing files. Same thing with your new file vs. your real file. Must be some difference, but what? Cell formatting should not matter. Make sure the ranges are all correct, and that the $ signs are all in the right places. Let us know how you make out. Good luck!
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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