Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default macro to use a cell's contents as it's name

Hi

I need a macro to use a cell's contents as it's name:

for example, if A1 contains the name "Fred Flintstone" I would like the macro to name cell A1 "Fred_Flintstone"

The cell reference will always be A1.

TIA

Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default macro to use a cell's contents as it's name

ActiveCell.Name = activeCell.Value

Make sure the value of the cell is a valid name. For example, no embedded
spaces.
--
Regards,
Tom Ogilvy

"Stephen Simons" wrote in message
...
Hi

I need a macro to use a cell's contents as it's name:

for example, if A1 contains the name "Fred Flintstone" I would like the

macro to name cell A1 "Fred_Flintstone"

The cell reference will always be A1.

TIA

Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default macro to use a cell's contents as it's name

Thanks Tom. It worked perfectly.

Steve




On Thu, 10 Jun 2004 15:41:18 -0400, "Tom Ogilvy" wrote:

ActiveCell.Name = activeCell.Value

Make sure the value of the cell is a valid name. For example, no embedded
spaces.


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
Using cell's contents as an index to a row ... ? Mac Excel Worksheet Functions 1 February 14th 09 12:07 AM
Using cell's contents as an index to a row ... ? Mac Excel Worksheet Functions 0 February 13th 09 11:36 PM
link to a cell's contents bluezcruizer Excel Worksheet Functions 1 December 3rd 06 12:49 PM
Rotate a box with a cell's contents Circe Excel Discussion (Misc queries) 6 February 3rd 05 11:45 PM
Macro Button To Modify A Cell's Contents? Virtanis Excel Programming 10 February 27th 04 08:51 PM


All times are GMT +1. The time now is 01:16 AM.

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

About Us

"It's about Microsoft Excel"