Listbox with Condition

mucah!t

Well-known Member
Joined
Jun 27, 2009
Messages
593
Hi all,

Is there a way to make a dynamic [as the length of the range is variable] listbox showing only the rows with "Employee:" in column B?

Excel Workbook
BCDEF
4Employee:Ethan Brown
51-JanSat6:00 - 14:305:3814:30
62-JanSun6:00 - 14:305:3714:18
73-JanMon6:00 - 14:305:3514:31
84-JanTue6:00 - 14:305:3514:30
95-JanWed6:00 - 14:305:3914:25
106-JanThu
11Employee:Ethan Brown
121-JanSat14:00 - 22:3013:4122:29
132-JanSun14:00 - 22:3013:4022:16
143-JanMon6:00 - 14:305:4814:47
154-JanTue14:00 - 22:3013:4222:26
16Employee:Ethan Brown
171-JanSat
182-JanSun6:00 - 14:309:5218:49
193-JanMon6:00 - 14:306:0214:05
204-JanTue
215-JanWed
226-JanThu6:00 - 14:305:4814:47
237-JanFri
Sheet1
Excel 2003
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You would need to create a dynamic named range with making another sheet that shows those lines. Here is an example I worked up using your example
Excel Workbook
ABCD
1Match DeptEmployee:Count3
2IdxEmployee:
34Ethan Brown
411Ethan Brown
516Ethan Brown
Sheet2
Excel 2003
Cell Formulas
RangeFormula
D1=COUNTIF(Sheet1!$B2:$B$22,B1)
B3=IF(N($A3),INDEX(Sheet1!$C$1:$C$22,$A3),"")
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself
copy the formulas down for several rows.

Then you can use this formula to create your dynamic named range, I used Emp_List
=OFFSET(Sheet2!$B$3,0,0,MATCH("*",Sheet2!$B:$B,-1),1)
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top