Hi.
I’ve written many a complicated lookup function in Excel, but the seemingly simple task I am trying to do now has left me stumped.
Attached you will find a workbook. It has two sheets – the first lists a set of public transport services and has a code for the service in column A. The second has a list of composite timetables – multiple services on one timetables – with an ID for the composite in column A again, and a set of values in column E onwards referring back to the individual Service IDs, one cell per service. It is done this way on purpose because the service codes have to be correctly formatted (correct number of spaces) so they are all validation drop-downs with the Sheet 1 service IDs as the validation range.
I now want to insert a column on the first sheet which shows what composite a service ID has been attached to. But that’s the bit that fails. I can look up on a given row, or in a given column, but I want to look up anywhere on the sheet and return the composite ID from column A. Ideally I even want to extend the lookup range, as users will be able to add another composite line. But that’s for the future – I can’t even get it to work on the table I’ve got!
I don’t care about errors where a service ID occurs more than once in different composites – returning just one ID is fine.
Also, it has to be worksheet functions. This will go to a number of users in different areas who will all have different macro pollicies, and is in any case created by code in the first place – so no macro solutions.
Thanks!
Stuart