• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Naming cells with range as input

praveen_ce

New Member
hi ppl ,

i try to use "name a range" very often

now my problem is

i have 10 ppl name and 4 branches they belong

i want to save those 14 names in name manager

i use this macro


'sub namemanager

ActiveCell.Select

acticecell.Name = ActiveCell.Value

ActiveCell.Select

end sub '


say if i want to do this for selected range(say"a1:b4") at once

how to do it


thnks in advance
 
Hi Praveen,


Try this.


sub namemanager

ActiveCell.Select

Range("A1:B4").Value = ActiveCell.Value

ActiveCell.Select

end sub


Thanks,

Suresh Kumar S
 
thnks suresh

i think it wont help

wat i need is something like u 1st select the range then when you run it

it should change

sytax should be something like this


'activerange.select'

'for each cell in activerange'

'activecell.name=activecell.value'

'next i'
 
Hi Praveen ,


I am not fully clear on your requirement , but are you looking for this ?

[pre]
Code:
For Each cel In Selection
cel.Name = cel.text
Next
[/pre]
Select the range which has the names before you run this macro.


Narayan
 
Back
Top