title: Assign a generic name to a range of cells
body: <p>I am trying to create a macro in VBA that assigns the name contained in a cell to a range of cells. As you can see from the picture, column “U” contains the name of the arrays that I have to create and the range of cells is from column V to column AH. Please consider that I would like to create the name of the array using the next cell in column U where there is something written in. Can you please help me in this task?</p>
  
  <p>Here is the code I used:</p>
  
  <pre><code>Selection.End(xlDown).Select
  
  ActiveWorkbook.Names.Add Name:="FTE_Headofsecurityandrevprotection_18", _
      RefersToR1C1:="='Job Title FTEs'!R36C22:R36C34"
  
  ActiveWorkbook.Names("FTE_Headofsecurityandrevprotection_18").Comment = "
  </code></pre>
  
  <p>Basically I would like to create a macro that assigns a name to a range of cells, using name manager. The names that name manager needs to create are in column U and the range of data that name manager needs to use are from column v to column AH. Please consider that name manager needs to be used for the next available cell in column U.</p>