Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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, _
         RefersTo:=x.Value
   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

 
discard

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