Quick Question: How to select the right colu...

Quick Question:

How to select the right column from several columns by the formula? I want to do some lookup based on the column I select. Thanks!

0 6 445
6 REPLIES 6

Would you please open your case little more, thanks.

@Aleksi_Alkio Sure. I try to lookup one data from one column by formula. But the column name is not fixed. It also need to be searched by one condition (The column name equal to what I select before). How could I make it happen. Thanks a lot!

You would need to create an IF statement with different LOOKUP expressions because you canโ€™t read the column name inside of the LOOKUP dynamically.

It would be very useful if we can read the column name inside of the LOOKUP dynamically.

Is there anyway around it? I want to select the columns name dynamically based on the USEREMAIL().

To do what I think you want, you would need to wrap the LOOKUP() in a conditional, e.g.:

SWITCH(
  USEREMAIL(),
  useremail1, LOOKUP(...),
  useremail2, LOOKUP(...),
  ...
)

You CANNOT do this:

LOOKUP(
  lookup-value,
  table,
  SWITCH(...),
  return-column
)

@Aleksi_Alkio Thanks! Translate

Top Labels in this Space