LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Working with lists

I have a list with several columns:
PARENT CHILD PHONE AGE NOTES...

I would like a dropdown with the parents listed one time, that would select
all their children and show the related information.

I would like a second dropdown with just their children listed so I can pick
the data from just that child.

1. I'm stumped on populating the first dropdown, listing the parents only
one time.
2. I think there should be a much better way then this code to select the
duplicate parents.

Sub pick()
'
' pick Macro
' Macro recorded 11/22/03 by James'

' MyData has the Parent's name
Sheets("Sheet2").Select
Range("e2").Select
MyData = ActiveCell.Text


' Col A has Parent's name, Col B has the Child's name
Sheets("Sheet1").Select
Range("a1").Select

' Sort data to group parents
Application.Goto Reference:="Sample"
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1").Select

'Find 1st incident of Parent
Do While ActiveCell.Text < MyData
ActiveCell.Offset(1, 0).Select
Loop

Set first = ActiveCell

' Find last incident of Parent
Do While ActiveCell.Text = MyData
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(-1, 15).Select
Set last = ActiveCell

Range(first, last).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A10").Select
ActiveSheet.Paste
Range("A10").Select


End Sub






 
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
Working with Lists (Now Tables) in Excel 2007 Christie P Excel Discussion (Misc queries) 4 July 15th 09 04:41 PM
Working with lists ArthurN Excel Discussion (Misc queries) 2 January 11th 09 08:00 AM
Protection with working dropdown lists. Chaltain Excel Discussion (Misc queries) 2 July 24th 06 09:33 PM
working with funcions in filtered lists steven Excel Discussion (Misc queries) 2 July 19th 06 07:00 PM
Working with Lists in Excel 2003 ksp Excel Worksheet Functions 0 August 12th 05 08:23 AM


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