Working within a pivot table and have added additional columns this way people can see what they spent and projected in the past and input for the future. However I have slicers so you select your Branch which auto populates in Column L, based on the auto populated Column L (Branch) want J (Division) to look at L and put in the assigned Division on what is in L. I tried to cheat and just do a formula to copy what was in L to put it in J then change it using the code below
Keep in mind this is a pivot table that will grow or shrink based on the branches selected.
For example Right now Column L shows RD1SL13310 - OSB so does Column J because I used the formula =L20 but I need to have OSB change to DFM in column J. This is the code I tried:
Columns("J:J").Select
Selection.Replace What:="RD1SL13310 - OSB", Replacement:="RD1SL13000 - DFM", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
That didn't work so I then tried:
Selection.Replace What:="RD1SL13000 - DFM", Replacement:="MRD1SL13310 - OSB", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Is there a faster more effective way to do this?
Keep in mind this is a pivot table that will grow or shrink based on the branches selected.
For example Right now Column L shows RD1SL13310 - OSB so does Column J because I used the formula =L20 but I need to have OSB change to DFM in column J. This is the code I tried:
Columns("J:J").Select
Selection.Replace What:="RD1SL13310 - OSB", Replacement:="RD1SL13000 - DFM", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
That didn't work so I then tried:
Selection.Replace What:="RD1SL13000 - DFM", Replacement:="MRD1SL13310 - OSB", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Is there a faster more effective way to do this?