Look for the 6th and 7th character in a cell

Tartesos

Board Regular
Joined
Feb 3, 2011
Messages
109
Hello again.

I was wondering if there is a way, using a formula, to look in a cell and depending on the carachter on the 6th and or 7th place to output a specific information in another cell.

Lets say we have a number, REF345678567.

I need to have a formula that will look that number and when it finds the number 5 (6th carac.) it will fill another cell with information from another columm.

It needs to look also for the 7th carac., in this case 6, and put information on another cell from a columm.

Can anyone help me with this ??

Thanks and regards.
 
You might have to add *1 after MID($A1,6,1) to coax it into a number.

=vlookup(MID($A1,6,1)*1,tabledata,2,false)
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Im missing something here because is not working. I have now a columm with the 200 posible outputs.
On the cell that I want the information to be I have set this =vlookup(MID($A1,6,1),E1:E200,2,FALSE), ok?
well, on the B columm , that is where I want to final data output is showing #N/A ... what it is that Im doing wrong??
Thanks
 
Upvote 0
Small step back .... when the 6th or 7th caract. is a letter like B, A or any combination of two letter .. it will not work ... showing the #VALUE .. error ... do I have to change something to also accept letters ?

:(
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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