Hi guys, like so often, the answert came to me minutes after posting. pmatch() does exactly what I need. match() gives the values of the elements, but not their positions. Thanks, robert