Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
georana
 
Posts: n/a
Default validation list or combo boxes with hyperlinks

Hi,

I have a spreadsheet with around 100 entries in one sheet related to a
hotel's rate contracts. Each contract (entry) covers around 30-35 lines. I
have already defined the print areas and I have named them accordingly. I
would like however to create a drowdown menu at the top of the sheet, from
where I could pick up the name of the contract and from there the equivalent
contract (as defined on the print area) to appear at the top of the sheet -
something like a hyperlink. Can anyone help please?

Thanks a lot in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default validation list or combo boxes with hyperlinks

Is this what you want? I have a data validation list in A2 with Contract
Names and I assumed the printareas have the same name. Selecting a contract
positions a copy the equivalent printarea at C2 and places a hyperlink to the
area in B1.

Code to be placed in the worksheet containing the contracts/print areas
Right click on worksheet tab, "view code" and copy.

HTH

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo wsexit:
Application.EnableEvents = False
If Target.Address = "$A$2" Then
Range("B1").Hyperlinks(1).SubAddress = Target.Value
Range(Target.Value).Copy Range("C2")
End If
wsexit:
Application.EnableEvents = True
End Sub

"georana" wrote:

Hi,

I have a spreadsheet with around 100 entries in one sheet related to a
hotel's rate contracts. Each contract (entry) covers around 30-35 lines. I
have already defined the print areas and I have named them accordingly. I
would like however to create a drowdown menu at the top of the sheet, from
where I could pick up the name of the contract and from there the equivalent
contract (as defined on the print area) to appear at the top of the sheet -
something like a hyperlink. Can anyone help please?

Thanks a lot in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default validation list or combo boxes with hyperlinks

You can use your list to create a data validation dropdown. It sounds like
the list of entries is on a different sheet. You can select them and do
Insert=Name=Define and type in the name List1 in the name box and click OK
(the refers to box should default to the cells selected - if not adjust it to
refer to your list).

Now go to the cell where you want to make the selection and do

Data=validation, select the list Option and in the source box type

=List

Now you can select from the dropdown.

go back to the Insert=Names=Define and select the Print_Area name for that
sheet. Change the refers to box to

=If(Datasheet!$B$9="",Indirect("Hotel1"),Indirect( DataSheet!$B$9))

Where DataSheet!B9 is the cell where you applied the data validation dropdown.

the only drawback, is if you go into pagesetup, I believe your formula will
be overwritten.

But once you have everything set up, you shouldn't need to.

--
Regards,
Tom Ogilvy



"georana" wrote:

Hi,

I have a spreadsheet with around 100 entries in one sheet related to a
hotel's rate contracts. Each contract (entry) covers around 30-35 lines. I
have already defined the print areas and I have named them accordingly. I
would like however to create a drowdown menu at the top of the sheet, from
where I could pick up the name of the contract and from there the equivalent
contract (as defined on the print area) to appear at the top of the sheet -
something like a hyperlink. Can anyone help please?

Thanks a lot in advance

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
update data validation list with new entries?? cjtj4700 Excel Discussion (Misc queries) 10 December 12th 05 01:00 AM
Dependent List (via Data Validation) Error Dezdan Excel Worksheet Functions 2 December 2nd 05 12:33 AM
Refresh a Validation List? jhollin1138 Excel Discussion (Misc queries) 3 February 17th 05 05:48 PM
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 07:33 PM
How do I autofill combo boxes with their destination cell? Defoes Right Boot Excel Worksheet Functions 3 January 10th 05 12:49 PM


All times are GMT +1. The time now is 05:26 PM.

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"