'Index / Match Horizontal Data With Multiple Criteria

I am trying to get this horizontal data table transposed into an easier to read vertical format. Through VBA, I'm able to get it unpivoted so that each ID # is on its own line.

Basically names are visited between 1 and 3 times checking for malfunction. If there is a malfunction, it is visited a second time for repair, and a third time if that repair fails. Pictures are taken at each visit, so a single component may have three sets of picture #s.

I think the best way to do this will be through an Index/Match, but I'm having difficulty getting started. I'm working primarily with cells E20:H23.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source