0

I am having an issue with type mismatch, in my table the value is general since it is copied and pasted values from a pivot table

Error thrown here:

Set mf = Columns("F").Find(What:=ONE, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)



Dim ONE As String

Worksheets("Chart").Activate
Columns("A:B").Select
Selection.Copy
Range("F1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Range("F2").Select
Application.CutCopyMode = False
Selection.Copy
ONE = Cells(2, "F").Value
Sheets("Paste Data Table").Select

Set mf = Columns("F").Find(What:=ONE, After:=ActiveCell, LookIn:= _
    xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
    xlNext, MatchCase:=False, SearchFormat:=False)

ActiveCell.EntireRow.Select

Application.CutCopyMode = False
Selection.Copy
Sheets("Top 5 Breakdown").Select

Sheets("Top 5 Breakdown").Select
Range("A2").Select
ActiveSheet.Paste
Worksheets("Paste Data Table").Activate
Range("A2").Select
Application.CutCopyMode = False
bullfrog97
  • 53
  • 7

1 Answers1

3

What causes error in this Find method is:

After:=ActiveCell

You can't search after cell which is not in searched range, column F in this case. Your active cell is not in column F.

Ryszard Jędraszyk
  • 2,296
  • 4
  • 23
  • 52