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?
尝试这个:
Sheet1.Cells(3,5).Value = Intersect(Sheet2.Range("rngHeadingRowofSheet"), Target.EntireColumn).Value
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.