Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to copy a cell that also has a "name", and paste it somewhere else so that the new cell also has the same "name"?

share|improve this question

migrated from stackoverflow.com May 15 '10 at 1:17

This question came from our site for professional and enthusiast programmers.

1 Answer 1

This VBA code copies all the nakms from active workbook to destination. Not quite sure what your trying to do but this should get you started:

Sub Copy_All_Defined_Names()
   ' Loop through all of the defined names in the active
   ' workbook.
     For Each x In ActiveWorkbook.Names
      Workbooks("Destination.xls").Names.Add Name:=x.Name, _
   Next x
End Sub

From here: http://support.microsoft.com/kb/213389

share|improve this answer
thanks guys, sorry didn't realise i was at the wrong place, thanks for the info all the same :) –  lee May 14 '10 at 21:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.