0

I am trying to get the column of the active cell and then find its intersection with the named range.

Sheet1.cells(3,5).value = Sheet2.cells(Intersect(Range("rngHeadingRowofSheet"), Target.Column)).Value

Target is the active cell whose column it will take and find the value of intersected cell with heading row named range.

But am getting type mismatch error. Can someone please help?

Julian Kuchlbauer
  • 895
  • 1
  • 8
  • 17
Sunaina
  • 65
  • 2
  • 2
  • 13

1 Answers1

0

Try this:

Sheet1.Cells(3,5).Value = Intersect(Sheet2.Range("rngHeadingRowofSheet"), Target.EntireColumn).Value
Julian Kuchlbauer
  • 895
  • 1
  • 8
  • 17