Explain this line of code to me

fw236

New Member
Joined
Jun 11, 2015
Messages
10
Can someone explain this line of code to me? It's too embedded to make sense.

=IF(ISTEXT(VLOOKUP(LEFT($E4,5),SLTOwner!A:B,2,FALSE)),VLOOKUP(LEFT($E4,5),SLTOwner!A:B,2,FALSE),IF(ISTEXT(VLOOKUP(LEFT($E4,4),SLTOwner!A:B,2,FALSE)),VLOOKUP(LEFT($E4,4),SLTOwner!A:B,2,FALSE),"TBD"))

Thank you.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
This formula looks at the first 5 characters of cell E4, if the value is text it searches for and returns that value in column B of Sheet SLTOwner. If it cannot find that value it looks at the first 4 characters of cell E4, if the result is text it searches for and returns that value in column B of Sheet SLTOwner. If it cannot find that value it returns the value "TBD".
 
Upvote 0
Is it possible to convert this line of code into a VBA function that takes in the parameter 5dot as the first 5 characters of E3 and 4 dots as the first 4 characters of E4 respectively? Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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