Hello Excel VBA experts,

I NEED your help!

In summary, I need to concatenate fields that are from Pivot Table based on criteria.

I have attached an excel file with different scenarios (each color represent a scenario) and a desired result that I want to accomplish (column E and F) of the file.

The idea behind concatenate Field 3 is to look at Field 3 with respect to Field 1 and Field 2.

The idea behind concatenate Field 1 and 2 is to look at field 2 with respect to Field 1. Thus, for each Field 2 values with respect to Field 1, it needs to concatenate.

Cell A3 to C15 is the "LOOK" of the Pivot Table after it's been made from the Raw Data (A23:C34)

Scenario 1 (red):
Concatenate 1 value from Field 2 to 1 value from Field 1.
Concatenate 3 values from Field 3.

Scenario 2 (blue):
Concatenate 2 values from Field 2 to 1 value from Field 1.
Concatenate 2 values EACH from Field 3 to Field 1 and Field 2.

Scenario 3 (green):
Concatenate 3 values from Field 2 to 1 value from Field 1 .
No Concatenate

Scenario 4 (orange):
Concatenate 1 value from Field 2 to 1 value from Field 1.
No Concatenate

My APOLOGIES of not being clear. I hope that the attached excel file could make you understand what I'm trying to accomplish.

concatenate.xlsx