• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Select specific value on filter and copy paste value

Hello All,

Kindly help me for the below requirement

On Sheet4 i have country name and on Sheet2 i have pivot table with formula.

So on sheet2 if i select particular country, i want to copy cell value from the columnE which is highlighted with yellow and paste into sheet4 Result column .

Attached Excel file for your reference.

Thanks in Advance,
Krishna
 

Attachments

  • CopyValues.xlsm
    42 KB · Views: 2
Hi:
May be the code as below..

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
i& = WorksheetFunction.Match(Me.[B1], Sheet3.Range("A2:A5"), 0)
j = Application.Max(Me.Range("E4:E23"))
If IsNumeric(i) Then: Sheet3.Range("B" & i + 1) = j: Sheet3.Range("B" & i + 1).Copy: Sheet3.Range("B" & i + 1).PasteSpecial
Application.CutCopyMode = False
End Sub

Thanks
 

Attachments

  • CopyValues.xlsm
    47.9 KB · Views: 3
Back
Top