Find a number of sublist

So here I have list of sublists which is basically import from excel file and list of sheet names. What I want to do is to find numbers of sublists in which each given sheet name is located i.e. to find in which string the given sheet name is located in excel file. How would I do that?

Hi @mironov.boris

Is this what your looking to do?

Well, not quite, here’s an example of what result I’d like to get

If you know the index of the value in the sublist (in the example, it is index 2), it is easy with this:

If you don’t know the index or if it can change, you will need to use List.Contains but it will give you the opposite of what you want, i.e. instead of a list [2, 3, 4, 0] you will get a list of [3, -1, 0, 1, 2] which matches the list with sublist with the list of parameter values.

Oh, it worked, thanks. Only in == node I had to enable the first layer for X. Now I want to extarct values at some exact number from sublists, like if I set number 1 for example above it’ll give a result like [f, s, t, a]. I thought it’d work like this

but it seems doesn’t take lists as indexes. Any ideas here?

Can you show the input for X and what the error is? As for using lists as the index, using List.GetItemAtIndex usually works better as it also allows levels.


And List.GetItemAtIndex doesn’t seem to work here or it just shows the same error

Well, I figured it out image