simple macro help

  • Is there a quick way to name a cell in column A with a name in column B? I have 1000 rows in column A needing a name that is located in column B. I posted on another site and received this answer:

    ActiveCell.Name = ActiveCell.Offset(,-1).Value

    but I do not know how to make this a macro. Plus, I think it's backwards. I have the name to the RIGHT of the cell I need the name in.

  • this may work. You may need to change the Range("A1") to whatever cell you want to start the selection in.

    Sub NameCells()
    Dim cell As Range

    Range("A1", Range("A1").End(xlDown)).Select
    For Each cell In Selection
    cell.Name = cell.Offset(0, 1).Value
    Next cell
    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!