Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ComboBox populated with data from AutoFilter

Hi

I am trying to generate a pivot table having the pivot fields passed
as parameters from five drop down lists.

Is there any posibility to populate the five drop down lists with the
data from Auto filters, instead of linking to a range.

Example:
first drop down list=Region(Asia Pacific, Americas, Europe)
second drop down list=Countries(Korea,China,Canada,Japan,France etc)
and so on ...

When I select Europe from the first drop down list, at this stage, the
second list is populated with all the countries , not only the
countries from Europe.(as an example, if I select Europe from the
first list, and Japan from the second list, there is no data generated
by the pivot table)

Is there any posibility to filter somehow the drop down lists, eg when
I select Europe from the first list, the second one should be
populated only with countries from Europe and so on...

Could anyone help me with this?

Thank you in advance,
Cristian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ComboBox populated with data from AutoFilter

If you use the dropdown lists from the autofilter, this is done
automatically. If not, you can get the visible rows with

Dim rng as Range, rng1 as Range, cell as Range
With ActiveSheet.autofilter.Range.Columns(1)
set rng = .offset(1,0).resize(.rows.count-1)
End With
On Error Resume Next
set rng1 = rng.SpecialCells(xlVisible)
On Error goto 0

If not rng1 is nothing then
for each cell in rng1
worksheets("Sheet1").Combobox1.Additem cell.value
Next
End if

--
Regards,
Tom Ogilvy


"Cristian" wrote in message
om...
Hi

I am trying to generate a pivot table having the pivot fields passed
as parameters from five drop down lists.

Is there any posibility to populate the five drop down lists with the
data from Auto filters, instead of linking to a range.

Example:
first drop down list=Region(Asia Pacific, Americas, Europe)
second drop down list=Countries(Korea,China,Canada,Japan,France etc)
and so on ...

When I select Europe from the first drop down list, at this stage, the
second list is populated with all the countries , not only the
countries from Europe.(as an example, if I select Europe from the
first list, and Japan from the second list, there is no data generated
by the pivot table)

Is there any posibility to filter somehow the drop down lists, eg when
I select Europe from the first list, the second one should be
populated only with countries from Europe and so on...

Could anyone help me with this?

Thank you in advance,
Cristian



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
Want only rows with populated data Pete[_7_] Excel Worksheet Functions 1 April 12th 11 04:21 PM
How do I insert a work sheet populated with data into another? GMPierre Excel Worksheet Functions 1 July 17th 08 09:12 PM
Identify last row of populated data Jumbo Shrimps, Jr. Excel Worksheet Functions 2 April 8th 07 08:03 AM
Formulas to calculate only when data is populated. ispy4mi6 Excel Worksheet Functions 2 February 23rd 07 07:43 PM
Having data automatically populated in a different sheet Nicki Excel Worksheet Functions 0 March 14th 06 12:27 AM


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