1

Firstly thank you for helping me out. I'm in the construction industry and don't have any clue how to best do this - not my forte!

I'm trying to bulk add a bunch of building product categories to my site's MySQL database. Easy enough, but there are about 650 entries and about 4 levels in the hierarchy. For it to work, each entry needs an ID, and then to fall within the hierarchy, have the ID of its parent in an additional column.

Please have a look at my Google sheet as attached. There are two sheets: the first one is what I'm trying to achieve, and the second one is just a visual tabbed representation of the hierarchy. In the first sheet, the hierarchy column indicates the respective hierarchies desired. I think it would be self-explanatory if you were to open it.

Google Sheet

0

=ARRAYFORMULA(IFERROR(VLOOKUP(LEFT(B2:B, LEN(B2:B)-2), {B2:B, A2:A}, 2, 0)))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.