Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a change event macro that fires any time there is a change on
the range G11:G30. I need to the macro to take the name in the G column and make it the name of the 4 cells directly to the right (H-K). If someone can figure out how to do that for me that would be great. G H I ....K 11 Cars Ford Ranger BMW 12 Movies Harry Potter Red Eye .... ... ... ... .... ... ... ... .... ... ... ... .... ... ... ... .... ... ... ... 30 Computers Dell IBM |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you mean create a Named Range
Private Sub Worksheet_Change(ByVal Target As Excel.Range) if target.count 1 then exit sub if not intersect(target,Range("G11:G30")) is nothing then if Not isempty(Target) then Target.Offset(0,1).Resize(1,4).Name = Target end if End if End Sub -- Regards, Tom Ogilvy "mastermind" wrote in message oups.com... I need a change event macro that fires any time there is a change on the range G11:G30. I need to the macro to take the name in the G column and make it the name of the 4 cells directly to the right (H-K). If someone can figure out how to do that for me that would be great. G H I ....K 11 Cars Ford Ranger BMW 12 Movies Harry Potter Red Eye ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 30 Computers Dell IBM |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, that worked pretty well. The only problem is, is that when I
enter a topic like "Frontend Loaders" it produces an error. However, if I highlight a set of cells and manually name them "Frontend_Loader" everything is okay. What is causing this error, and how can I fix it? Also will this work with "(" ")" in the topic cell? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Names can't have spaces in them.
Target.Offset(0,1).Resize(1,4).Name = Target could be replaced (maybe???) with: Target.Offset(0,1).Resize(1,4).Name = application.substitute(Target," ","_") But there are other things that you could type that would also be invalid -- things that look like cell addresses for example. mastermind wrote: Well, that worked pretty well. The only problem is, is that when I enter a topic like "Frontend Loaders" it produces an error. However, if I highlight a set of cells and manually name them "Frontend_Loader" everything is okay. What is causing this error, and how can I fix it? Also will this work with "(" ")" in the topic cell? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
Change event triggered by a named range | Excel Programming | |||
Change Event on a named range | Excel Programming | |||
Change event and calculate event | Excel Programming | |||
Remember SelectionChange range in the Change sheet event? | Excel Programming |