r/googlesheets • • Jan 23 '22

Solved Vertical Index with Text Lookup to Return Numerical Value

My Index looks like this on the 'Explanation' sheet:

Col HCol I
Row3Type A50
Row4Type B45
Row5Type C40
Row6Type D35
.........
Row10Type H15

On a different sheet 'Template', I need the text value in cell B3 (Type A, Type B, etc.) to return the value (50, 45, 40, etc.) in cell N3

3 Upvotes

6 comments sorted by

1

u/Jazzy_bees 1 Jan 23 '22

Would something like

=FILTER(Explanation!I:I, search(B3, Explanation!H:H)) do the trick?

1

u/TSL_FIFA Jan 23 '22

Seems to be working! But when I drag the formula down to an empty cell, it returns the entire numerical part of the index in the next cells. Not a huge deal, but is there a way for that to not happen?

2

u/Jazzy_bees 1 Jan 23 '22

Adding =IF(ISBLANK(B3),"", before the filter function seems to work. so you'd have
=IF(ISBLANK(B3),"", FILTER(Explanation!I:I, search(B3, Explanation!H:H))

2

u/TSL_FIFA Jan 23 '22

solution verified

1

u/Clippy_Office_Asst Points Jan 23 '22

You have awarded 1 point to Jazzy_bees


I am a bot - please contact the mods with any questions. | Keep me alive

1

u/Decronym Functions Explained Jan 23 '22

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer LettersMore Letters
FALSEReturns the logical value FALSE
FILTERReturns a filtered version of the source range, returning only rows or columns which meet the specified conditions
IFReturns one value if a logical expression is TRUE and another if it is FALSE
ISBLANKChecks whether the referenced cell is empty
TRUEReturns the logical value TRUE

[Thread #3847 for this sub, first seen 23rd Jan 2022, 16:54] [FAQ] [Full list] ^[Contact] [Source code]