Hello everyone,
I have a strange formating problem with a pivot.
The left side of the pivot has 3 fields all collapsed (so you can see the + on the left)
If i put color to one cell from the list manually , i can still expand and recollapse the field and the cell keeps the formating
however in this case i have made a vba sub that checks every cell in the left collumn of the pivot and compares it with a list in another sheet with formats and if the string is the same then it copies the format to the pivot cell.
It works perfectly , BUT when i try to expand a field everything goes back to unformatted state!!
does anyone understands why this is happenning?
The pivot was made from the macro recorder and then i modified it to be dynamic acording to the data sheet.
The vba code for the formatting is a simple loop within loop
For Each i In PivR (for every cell in the left column of the pivot)
For Each k In PivD (for every cell in the list with the wannabe formats)
If i = k Then
k.Copy
i.PasteSpecial xlPasteFormats
GoTo Here
Else
End If
Next k
Here:
Next i
I have a strange formating problem with a pivot.
The left side of the pivot has 3 fields all collapsed (so you can see the + on the left)
If i put color to one cell from the list manually , i can still expand and recollapse the field and the cell keeps the formating
however in this case i have made a vba sub that checks every cell in the left collumn of the pivot and compares it with a list in another sheet with formats and if the string is the same then it copies the format to the pivot cell.
It works perfectly , BUT when i try to expand a field everything goes back to unformatted state!!
does anyone understands why this is happenning?
The pivot was made from the macro recorder and then i modified it to be dynamic acording to the data sheet.
The vba code for the formatting is a simple loop within loop
For Each i In PivR (for every cell in the left column of the pivot)
For Each k In PivD (for every cell in the list with the wannabe formats)
If i = k Then
k.Copy
i.PasteSpecial xlPasteFormats
GoTo Here
Else
End If
Next k
Here:
Next i