#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I'm Stumped


Can anyone tell me how I can use a drop down list of months (april -
march) and use that list to show only certain rows on the worksheet -
depending on what month is selected?

It's a tricky one - help very much appreciated.

ExcelBob


--
ExcelBob
------------------------------------------------------------------------
ExcelBob's Profile: http://www.excelforum.com/member.php...o&userid=34152
View this thread: http://www.excelforum.com/showthread...hreadid=545416

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I'm Stumped


elaborate....just a little bit on this one so we know exactly what yo
want.

--
gti_jober
-----------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...fo&userid=3063
View this thread: http://www.excelforum.com/showthread.php?threadid=54541

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default I'm Stumped

Bob,
Something like, assuming the months are in the first column of data:
Private Sub cboMonths_Click()
Range("rngData").AutoFilter Field:=1, Criteria1:=cboMonths.Text
End Sub

NickHK

"ExcelBob" wrote in
message ...

Can anyone tell me how I can use a drop down list of months (april -
march) and use that list to show only certain rows on the worksheet -
depending on what month is selected?

It's a tricky one - help very much appreciated.

ExcelBob


--
ExcelBob
------------------------------------------------------------------------
ExcelBob's Profile:

http://www.excelforum.com/member.php...o&userid=34152
View this thread: http://www.excelforum.com/showthread...hreadid=545416



  #4   Report Post  
Posted to microsoft.public.excel.programming
DS DS is offline
external usenet poster
 
Posts: 117
Default I'm Stumped

Hi Bob,

not sure if this will help, but if you set a macro in your Worksheet (as
opposed to a Module) to trigger when the value in your drop-down list cell
(assuming you're using Data Validation in a cell), and set this to select
rows based on the value entered, where you define them as Hidden = True, then
this might do the job for you? If there are more to be hidden than unhidden,
if you select valid rows as Hidden = True, then the ones you want visible as
Hidden = False, this will just show the ones you're after.

Like gti_jobert says, if you can provide a little more info, might be able
to come up with something a little more appropriate?

HTH
DS

"ExcelBob" wrote:


Can anyone tell me how I can use a drop down list of months (april -
march) and use that list to show only certain rows on the worksheet -
depending on what month is selected?

It's a tricky one - help very much appreciated.

ExcelBob


--
ExcelBob
------------------------------------------------------------------------
ExcelBob's Profile: http://www.excelforum.com/member.php...o&userid=34152
View this thread: http://www.excelforum.com/showthread...hreadid=545416


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I'm Stumped


What I've got is about 20 rows in column A with April, May, June, July
etc written in. Then in B3 I have a drop down list of months and when
you select April I want it to show only the 20 rows with April in
column A etc

Autofilter does work to an extent, but I don’t want the user to be able
to show all rows at once (just the rows that relate to the month they
are working on). Plus autofilter displays the months in alphabetical
order which doesn’t look good.

Once a month has been selected data needs to be entered into the
workbook to the right hand side and is then copied onto other sheets
depending on what month is selected.


--
ExcelBob
------------------------------------------------------------------------
ExcelBob's Profile: http://www.excelforum.com/member.php...o&userid=34152
View this thread: http://www.excelforum.com/showthread...hreadid=545416



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I'm Stumped


dunno....like this:


Code:
--------------------

Private Sub ComboBox_Change()

Application.ScreenUpdating = False

Rows("6:12").Select
Selection.EntireRow.Hidden = True

Select Case ComboBox.Value

Case "January"
Rows("6:8").Select
Selection.EntireRow.Hidden = False

Case "Febuary"
Rows("9:12").Select
Selection.EntireRow.Hidden = False

'etc etc

End Select

Application.ScreenUpdating = True

End Sub

--------------------


HTH


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=545416

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default I'm Stumped

see reply to your posting in other group

--
Regards

Roger Govier


"ExcelBob" wrote
in message ...

What I've got is about 20 rows in column A with April, May, June, July
etc written in. Then in B3 I have a drop down list of months and when
you select April I want it to show only the 20 rows with April in
column A etc

Autofilter does work to an extent, but I don’t want the user to be
able
to show all rows at once (just the rows that relate to the month they
are working on). Plus autofilter displays the months in alphabetical
order which doesn’t look good.

Once a month has been selected data needs to be entered into the
workbook to the right hand side and is then copied onto other sheets
depending on what month is selected.


--
ExcelBob
------------------------------------------------------------------------
ExcelBob's Profile:
http://www.excelforum.com/member.php...o&userid=34152
View this thread:
http://www.excelforum.com/showthread...hreadid=545416



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I'm Stumped


this would be better;


Code:
--------------------

Private Sub ComboBox_Change()

Application.ScreenUpdating = False

'Hide All Rows
Rows("6:12").Select
Selection.EntireRow.Hidden = True

'Unhide Rows that match ComboBox value
i = 3
Do
Cells(i, 1).Select
If ActiveCell.Value = ComboBox.Value Then
Rows(i).Select
Selection.EntireRow.Hidden = False
End If
i = i + 1
Loop Until Cells(i, 1).Value = ""


Application.ScreenUpdating = True

End Sub

--------------------


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=545416

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
This has me stumped wild turkey no9 Excel Discussion (Misc queries) 5 March 14th 10 03:16 AM
Stumped lightbulb Excel Discussion (Misc queries) 3 December 21st 09 03:56 PM
Still stumped LarryK Excel Worksheet Functions 7 March 30th 09 11:15 AM
stumped LarryK Excel Worksheet Functions 4 March 28th 09 05:54 PM
stumped ?? my Excel Worksheet Functions 2 April 13th 06 12:32 PM


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