Dynamic INDEX and MATCH?

apo

Well-known Member
Joined
Nov 3, 2008
Messages
581
HI..

I am trying to populate B2:E2 and J2:K2 on a sheet called "Monday" with data from a sheet called "Roster". This data will populate a stacked bar chart showing workers shifts.

Currently it is using static formulas in each cell. The issue is that it needs to be dynamic because Employees can be added/removed for the Roster sheet.

I was thinking perhaps a INDEX and MATCH formula in each cell (B,C,D,E,J and K)might solve this.. but I can't seem to get my head wrapped around it.

Perhaps some VBA can do it too?

If any of the excel gurus can help, it will be most appreciated.

Thanks

Monday

*ABCDEFGHIJK
1EmployeeStartLunch StartLunch EndEndStartTime to LunchTime for LunchTime to EndFirst ShiftSecond Shift
2Tim8:30 AM12:00 PM1:00 PM11:00 PM8:30 AM3:301:0010:00TABTAB

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:110px;"><col style="width:64px;"><col style="width:75px;"><col style="width:69px;"><col style="width:64px;"><col style="width:64px;"><col style="width:94px;"><col style="width:101px;"><col style="width:85px;"><col style="width:90px;"><col style="width:90px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
A2=IF(Roster!A10="", 0, VLOOKUP(Roster!A10,Employees,1,FALSE))
B2=Roster!C10
C2=Roster!D10
D2=Roster!C12
E2=Roster!D12
F2=B2
G2=C2-B2
H2=D2-C2
I2=E2-D2
J2=Roster!C9
K2=Roster!C11

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4



Roster

*ABCDEFGHIJKLMNOP
9**TABTABGroup LeaderPokiesChange*Change
10Tim388:3012:007:0012:007:3010:307:0010:008:3010:30**8:3010:30
11**TABChangeChangePokiesChange*Pokies
12**13:0023:0013:0018:0011:3015:3011:0014:0011:3014:30**11:3013:30

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B10=IF(A10="", 0, VLOOKUP(A10,Employees,3,FALSE))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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