Forum Discussion
EXCEL: "If cell contains specific letter using LEFT formula then return specific text"
Deleted
Hi
I created a sample Excel file for you
If your values to evaluate are in Column A then use this function in Column B
=IFERROR(VLOOKUP(LEFT(A2,1),$H$2:$I$4,2,0),"")
Range H2 : I4 is the Table array of the VLOOKUP function
Then Hit F2 (edit Mode)
Select the Table array and Hit F9 >> Enter
You now hardcoded the Table array INSIDE the function
Delete the Table array
Copy Your Function down
=IFERROR(VLOOKUP(LEFT(A7,1),{"E","Txt for E";"F","Txt for F";"U","Txt for U"},2,0),"")
Hope that helps
Nabil Mourad
- Anga73Aug 31, 2020Copper Contributor
I have be trying to do this with a spreadsheet I prepare every month for ages but have never been able to figure it out. My letters are on the right - so I replaced left with right using your formula and it works like a dream.
Thank you so much - this has saved me so much time.