Excel/Transpose with a twist
QUESTION: Hello Bob,
I have a transposition question, but with a twist.
Please see the attached image.
I think that explains everything clearly.
I have considered fancy lookups, index/match, and vba - all to no avail.
I'm not an expert vba guy like you, and I'm guessing this definitely needs a vba solution.
Thanks for your efforts, Bob!
- Al Baker
ANSWER: Most would use a VBA solution, but here's a pure formula solution. Do exactly as these instructions show & it'll work. It's based on your example.
Put f1,f2,f3,f4 in D1:G1
in H2, put this formula (COlumns H:K will be hidden - they're helper columns)
Copy this formula to K2.
Copy H2:K2 down as far as you think necessary to hold all your values (maybe down to row 10000 or so)
(H1:K1 is left blank)
Put this formula in D2:
Fill right to G2
Fill D2:H2 down as far as necessary (this will contain your answers)
Hide columns H:K
Done (assuming auto calc is on! - else calculate)
---------- FOLLOW-UP ----------
QUESTION: Bob, your non-VBA solution is BRILLIANT.
However, and I guess I didn't make this clear enough, it's possible and likely that not all 4 fields will be filled out for each record. For instance, let's say that the 1st 2 records have all 4 fields filled out. Your solution works great.
But for the 3rd record, only fields 1,3, and 4 are completed, i.e. field 2 is left blank. So for the 4th record, your solution would put the field 2 entry into the 3 record.
My original image attachment shows an example where the 1st record is missing f4. Your solution would put f4 from the 2nd record into the row for the 1st record.
That said, your solution is extremely impressive. You're exactly right in that most would try a VBA solution and so that's what I've found. But thank you so much for your efforts, Bob !
I don't think you can tell that something is missing. For example, suppose your first F1 is missing. From the first TWO records. How can I tell the first F1 found is actually from the 3rd record? I think you'd need to really keep placeholders until the data is found. Have f1,f2,f3,f4 always, but leave them blank if necessary. Even VBA would be really tough to know the first F1 is from the 3rd set!