0

Trouble with Text Formula - Left & IndexOf

Hi All,

I'm trying to build the formula in a table component, but it is not returning results.

left(slice(@A:A;),INDEXOF(slice(@A:A;),"?",1))

Alt+A on IndexOf part of the formula returns the expected number for each row.

 

But when IndexOf() is nested inside the Left() function it returns blank for all rows.

Is this a bug, or am I missing something really simple?

Thanks

2 comments

  • 1
    Avatar
    Meggan King

    Hi Ben

    The LEFT() function won't take a list of values in the second parameter. It will apply the first value returned by the INDEXOF to every thing in your first SLICE(A:A)

    You could try SUBSTRING() instead and see if that solves your issue. Without looking at the data, I would think SUBSTRING(SLICE(A:A,0,INDEXOF()) would work using the INDEXOF from your above formula.

     

    Thanks,

    Meggan

  • 0
    Avatar
    Ben Munk

    Awesome, SUBSTRING did the trick!

    Good to know that LEFT behaves differently to SUBSTRING

    Thanks for your quick reply.  

     

    Ben

Please sign in to leave a comment.