Forum Discussion
LOOKUP Expression?
- May 17, 2019
- KC_86May 21, 2019Copper Contributor
SergeiBaklan
I tried to apply the same expression for different spreadsheets but it didn't work because of the wrong data type. Could you advise me how should I fix the error? I used your expression before and it worked on other sheets but not this one.
I want to look up the Dosage value in EVENT tab based on the Event Code columns for PARTICIPATION tab.Thank you.
- SergeiBaklanMay 21, 2019Diamond Contributor
KC_86 , you don't need double dash here since event code is the text in both sheets. Previous time you have numbers in one sheet and texts as numbers in another one.
=INDEX(EVENT!F:F,MATCH($E2,EVENT!E:E,0))
- KC_86May 21, 2019Copper Contributor
SergeiBaklan
Thank you very much for your help again. Now it all made sense. I just tested the expression and it worked beautifully.
- KC_86May 21, 2019Copper Contributor
SergeiBaklan
I tried to apply the same expression for different spreadsheets but it didn't work because of the wrong data type. Could you advise me how should I fix the error? I used your expression before and it worked on other sheets but not this one.
I want to look up the Dosage value in EVENT tab based on the Event Code columns for PARTICIPATION tab.Thank you.
- Kim_WennerbergMay 17, 2019Copper ContributorSergei,
Can you explain the double-dash used in the MATCH function? (--$C2)- SergeiBaklanMay 17, 2019Diamond Contributor
Kim, there are numbers as text in column C, and in lookup column we have numbers. Double dash converts texts to numbers. Same as VALUE() here.
- Kim_WennerbergMay 17, 2019Copper Contributor
I am not finding it necessary to use double dash to convert "FALSE" to 0 in Excel Office 365. I can just act as if FALSE is a 0 or TRUE is a 1 and use it in other formulas.
Cell A2 resolves to FALSE
CELL A3 contains =A2*3 and displays 0
Same behavior with TRUE. Double dash seems no longer necessary.
- KC_86May 17, 2019Copper Contributor
SergeiBaklan
It works beautifully! Thank you very much.- SergeiBaklanMay 17, 2019Diamond Contributor
KC_86 , you are welcome