Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Naming Ranges with code

Hello all, i have a report that has rows added to it and it has both a
columnm that is a range name, so the new cell has to be added to the range
and secondly within that range the cell has it's own name dependant on what
the user puts in.

C D E
Desc. Code P/O

Bonnet Hood "HoodPo"Range name
Bumper(Font) BF "BFPo"
Bumper(Rear) BR "BRPo"
Front end FRT "FRTPo"
IMC-SAS IMC "IMCPo"
New Part Test "TestPo"-- New range Name for cell.

The old PORange in column "E" (E1:E5) must expand to (E1:E6)

The "code" will be put in by the user.


--
Les
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Naming Ranges with code

More info. However, probably best to have the name defined by the offset
formula

insertnamedefinename itin the refers to box type
=offset($C$1,1,0,counta($C:$C)-1,1)
Now when you add/subtract a row of info the range will auto adjust.
For the data, user can input or use a macro using inputbox

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Les" wrote in message
...
Hello all, i have a report that has rows added to it and it has both a
columnm that is a range name, so the new cell has to be added to the range
and secondly within that range the cell has it's own name dependant on
what
the user puts in.

C D E
Desc. Code P/O

Bonnet Hood "HoodPo"Range name
Bumper(Font) BF "BFPo"
Bumper(Rear) BR "BRPo"
Front end FRT "FRTPo"
IMC-SAS IMC "IMCPo"
New Part Test "TestPo"-- New range Name for cell.

The old PORange in column "E" (E1:E5) must expand to (E1:E6)

The "code" will be put in by the user.


--
Les


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Naming Ranges with code

On 19 Jan., 12:07, Les wrote:
Hello all, i have a report that has rows added to it and it has both a
columnm that is a range name, so the new cell has to be added to the range
and secondly within that range the cell has it's own name dependant on what
the user puts in.

* * C * * * * * * * * * *D * * * * * E
*Desc. * * * * * * * Code * * * P/O

Bonnet * * * * * * *Hood * * *"HoodPo"Range name
Bumper(Font) * *BF * * * * *"BFPo"
Bumper(Rear) * BR * * * * * "BRPo"
Front end * * * * *FRT * * * *"FRTPo"
IMC-SAS * * * * * IMC * * * *"IMCPo"
New Part * * * * * Test * * * "TestPo"-- New range Name for cell.

The old PORange in column "E" (E1:E5) must expand to (E1:E6)

The "code" will be put in by the user.

--
Les


Hi Les

Put this in the code sheet for the desired worksheet

Private Sub Worksheet_Change(ByVal Target As Range)
Dim vName As String
Dim tRange As Range
If Target.Column = 4 Then
vName = Target.Value
Set tRange = Range("E1", Cells(Target.Row, 4))
vName = vName & "Po"
tRange.Name = vName
Target.Offset(0, 1) = vName
End If
End Sub

// Per
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
naming ranges TechyTemp Excel Worksheet Functions 0 November 29th 06 09:18 PM
Naming Ranges Simon Shaw Excel Discussion (Misc queries) 1 February 15th 05 01:17 AM
Naming Ranges Donna In Denver Excel Discussion (Misc queries) 1 January 28th 05 07:48 AM
Naming Ranges James Montgomery Excel Programming 5 November 7th 04 04:36 AM
naming ranges Alexander Bogomolny Excel Programming 2 July 28th 04 02:27 AM


All times are GMT +1. The time now is 06:42 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"