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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,215,461
Messages
6,124,954
Members
449,198
Latest member
MhammadishaqKhan

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