Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Named ranges

I have text in cell A1. In B1, I want to create a named range = text in A1.
How would I write the code for that? Thanks.

Steve C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Named ranges

Range("B1").Name = Range("A1")

--

Vasant

"Steve C" wrote in message
...
I have text in cell A1. In B1, I want to create a named range = text in

A1.
How would I write the code for that? Thanks.

Steve C



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Named ranges

Steve

Try something like this

Sub SetRngName()
ThisWorkbook.Names.Add Name:=Range("A1").Value, _
RefersTo:="=Sheet1!$B$1"
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

"Steve C" wrote in message
...
I have text in cell A1. In B1, I want to create a named range = text in
A1.
How would I write the code for that? Thanks.

Steve C



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Named ranges

Thanks! That works great!

"Vasant Nanavati" wrote:

Range("B1").Name = Range("A1")

--

Vasant

"Steve C" wrote in message
...
I have text in cell A1. In B1, I want to create a named range = text in

A1.
How would I write the code for that? Thanks.

Steve C




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Named Ranges Epinn Excel Worksheet Functions 23 October 16th 06 07:27 AM
Named Ranges Joe Gieder Excel Worksheet Functions 2 February 16th 06 01:31 AM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Named Ranges Marie Excel Programming 2 August 5th 04 09:55 PM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM


All times are GMT +1. The time now is 03:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"