#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Validation

not sure what you mean by retrieving information

so if you have a range selected on your main sheet, enter this as a formula
array

=INDIRECT(IF(C6="OFC","Sheet1!A1:C20","Sheet2!D1:F 20"))

if select one of two 20x3 tables depending on the validated cell - in my
example, this is C6

"Kanmi" wrote in message
...
Please how can i use validate dropdown menu data and link to some set of
data
on another worksheet. I have dropdown menu "OFC and DOWNSTRM" I mean when
i
select OFC then it should retrieve information for OFC and when i select
DOWNSTRM then it should retrieve information for DOWNSTRM . Please can
anybody advice on what to do?. Thanks. Appreciate your time.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Validation

Compile Error Expected sub. Hoping this code will do what i want but it
giving error. aadvice

Private Sub CommandButton1_Click()
ask = MsgBox("Build safety report?", vbYesNo, BoxTitle)
If ask = 7 Then Exit Sub

Select Case Range("D21")
Case "DOWNSTRM":
Set TrainingSht = Sheets("Training_Progress_By_Employee")
Set PersonnelSht = Sheets("Personnel Roster")
Set LookupSht = Sheets("Lookup")

Case "OFC":
Set TrainingSht = Sheets("Training_Progress_By_Employee2")
Set PersonnelSht = Sheets("Personnel Roster2")
Set LookupSht = Sheets("Lookup2")

End Select
Sub BuildDetailReport(TrainingSht, PersonnelSht, LookupSht)
MsgBox "Done", , BoxTitle
End Sub

"Patrick Molloy" wrote:

not sure what you mean by retrieving information

so if you have a range selected on your main sheet, enter this as a formula
array

=INDIRECT(IF(C6="OFC","Sheet1!A1:C20","Sheet2!D1:F 20"))

if select one of two 20x3 tables depending on the validated cell - in my
example, this is C6

"Kanmi" wrote in message
...
Please how can i use validate dropdown menu data and link to some set of
data
on another worksheet. I have dropdown menu "OFC and DOWNSTRM" I mean when
i
select OFC then it should retrieve information for OFC and when i select
DOWNSTRM then it should retrieve information for DOWNSTRM . Please can
anybody advice on what to do?. Thanks. Appreciate your time.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Validation

change this

Sub BuildDetailReport(TrainingSht, PersonnelSht, LookupSht)

to this
BuildDetailReport TrainingSht, PersonnelSht, LookupSht


reason: you have two sub definitions but only terminate the second with the
End Sub statement. I've already asked you to and an End Sub immdiately after
your End Select, but you said that doesn';t work. my guess is that after
your select statement block yo intend to call the report builder, so it
needs to have the correct syntax, which I hope is now correct.

If this does not work, please show your full code as it currently is, and
state what error messages you get and where they occur

thanks
Patrick

"Kanmi" wrote in message
...
Compile Error Expected sub. Hoping this code will do what i want but it
giving error. aadvice

Private Sub CommandButton1_Click()
ask = MsgBox("Build safety report?", vbYesNo, BoxTitle)
If ask = 7 Then Exit Sub

Select Case Range("D21")
Case "DOWNSTRM":
Set TrainingSht = Sheets("Training_Progress_By_Employee")
Set PersonnelSht = Sheets("Personnel Roster")
Set LookupSht = Sheets("Lookup")

Case "OFC":
Set TrainingSht = Sheets("Training_Progress_By_Employee2")
Set PersonnelSht = Sheets("Personnel Roster2")
Set LookupSht = Sheets("Lookup2")

End Select
Sub BuildDetailReport(TrainingSht, PersonnelSht, LookupSht)
MsgBox "Done", , BoxTitle
End Sub

"Patrick Molloy" wrote:

not sure what you mean by retrieving information

so if you have a range selected on your main sheet, enter this as a
formula
array

=INDIRECT(IF(C6="OFC","Sheet1!A1:C20","Sheet2!D1:F 20"))

if select one of two 20x3 tables depending on the validated cell - in my
example, this is C6

"Kanmi" wrote in message
...
Please how can i use validate dropdown menu data and link to some set
of
data
on another worksheet. I have dropdown menu "OFC and DOWNSTRM" I mean
when
i
select OFC then it should retrieve information for OFC and when i
select
DOWNSTRM then it should retrieve information for DOWNSTRM . Please can
anybody advice on what to do?. Thanks. Appreciate your time.


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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Programming 0 November 7th 06 12:54 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


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