Its a difficult one to explain but I have spent hours trying to work this out and I have literally hit a brick wall. Not sure how to upload the spreadsheet to make it easier to explain so apologies. I have inherited this and I just dont know how to work this out and I know what I want to work out but not sure how to do it.
First one is to look up all zone one data (tab2) and return number of planned jobs and restoration jobs for that zone (tab1). I have 9 zones in all. 17 I know is wrong as thats the total for all, what I need is the 17 split between Tyne & Wear and West Yorkshire Etc
Tab 1
[TABLE="width: 861"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 2"]Live Generator Count[/TD]
[TD="colspan: 2"]Total Days Connected[/TD]
[TD="colspan: 2"]Total Running Costs[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[/TR]
[TR]
[TD]Tyne & Wear[/TD]
[TD="align: right"]17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]West Yorkshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]South Yorkshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Teesside[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Humber Estuary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Northumberland + Co Durham[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yorkshire Moors + Wolds[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yorkshire Dales[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North Lincolnshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Tab 2
[TABLE="width: 586"]
<tbody>[TR]
[TD]ZONE[/TD]
[TD]RESTORATION/PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
</tbody>[/TABLE]
Second one is and this is totally driving me nuts. Tab 2 needs to look at tab 1. Look for all 100kva generators, and return how much it will cost for the number of days hire. So day 1 is say £677.85 and all days after that is £29.61. So if a 15kva generator has run 22 days then it will return £1299.66. Problem is there on different tabs.
Probably none of the above makes sense and I dont know how to upload the spreadsheet
Tab 1
[TABLE="width: 555"]
<tbody>[TR]
[TD]Generator Size[/TD]
[TD]1st Day[/TD]
[TD]Subs Days[/TD]
[TD]1 Week Hire[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]£677.85[/TD]
[TD]£29.61[/TD]
[TD]£855.51[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]£682.90[/TD]
[TD]£35.69[/TD]
[TD]£897.04[/TD]
[/TR]
[TR]
[TD]50[/TD]
[TD]£682.90[/TD]
[TD]£35.69[/TD]
[TD]£897.04[/TD]
[/TR]
[TR]
[TD]80[/TD]
[TD]£722.40[/TD]
[TD]£53.39[/TD]
[TD]£1,042.74[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]£722.40[/TD]
[TD]£53.39[/TD]
[TD]£1,042.74[/TD]
[/TR]
[TR]
[TD]150[/TD]
[TD]£1,025.53[/TD]
[TD]£90.57[/TD]
[TD]£1,568.95[/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]£1,025.53[/TD]
[TD]£90.57[/TD]
[TD]£1,568.95[/TD]
[/TR]
[TR]
[TD]250[/TD]
[TD]£1,535.61[/TD]
[TD]£152.08[/TD]
[TD]£2,448.09[/TD]
[/TR]
[TR]
[TD]320[/TD]
[TD]£1,535.61[/TD]
[TD]£152.08[/TD]
[TD]£2,448.09[/TD]
[/TR]
[TR]
[TD]500[/TD]
[TD]£2,134.46[/TD]
[TD]£243.95[/TD]
[TD]£3,598.16[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]£2,918.10[/TD]
[TD]£367.19[/TD]
[TD]£5,121.24[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]£2,918.10[/TD]
[TD]£367.19[/TD]
[TD]£5,121.24[/TD]
[/TR]
[TR]
[TD]1250[/TD]
[TD]£3,499.55[/TD]
[TD]£501.49[/TD]
[TD]£6,508.49[/TD]
[/TR]
</tbody>[/TABLE]
Tab 2
[TABLE="width: 1269"]
<tbody>[TR]
[TD]ZONE[/TD]
[TD]RESTORATION/PLANNED[/TD]
[TD]GENERATOR SIZE (KVA)[/TD]
[TD]DATE/TIME CONNECTED TO THE NETWORK[/TD]
[TD]DAYS CONNECTED[/TD]
[TD]PROVISIONAL COSTS[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[TD]100[/TD]
[TD]29/06/2018 00:00[/TD]
[TD]22[/TD]
[TD]£1,299.66[/TD]
[/TR]
</tbody>[/TABLE]
First one is to look up all zone one data (tab2) and return number of planned jobs and restoration jobs for that zone (tab1). I have 9 zones in all. 17 I know is wrong as thats the total for all, what I need is the 17 split between Tyne & Wear and West Yorkshire Etc
Tab 1
[TABLE="width: 861"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 2"]Live Generator Count[/TD]
[TD="colspan: 2"]Total Days Connected[/TD]
[TD="colspan: 2"]Total Running Costs[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[TD]Planned[/TD]
[TD]Restoration[/TD]
[/TR]
[TR]
[TD]Tyne & Wear[/TD]
[TD="align: right"]17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]West Yorkshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]South Yorkshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Teesside[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Humber Estuary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Northumberland + Co Durham[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yorkshire Moors + Wolds[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yorkshire Dales[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North Lincolnshire[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Tab 2
[TABLE="width: 586"]
<tbody>[TR]
[TD]ZONE[/TD]
[TD]RESTORATION/PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]PLANNED[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]02-TYNE AND WEAR[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
[TR]
[TD]03-TEESSIDE[/TD]
[TD]RESTORATION[/TD]
[/TR]
</tbody>[/TABLE]
Second one is and this is totally driving me nuts. Tab 2 needs to look at tab 1. Look for all 100kva generators, and return how much it will cost for the number of days hire. So day 1 is say £677.85 and all days after that is £29.61. So if a 15kva generator has run 22 days then it will return £1299.66. Problem is there on different tabs.
Probably none of the above makes sense and I dont know how to upload the spreadsheet
Tab 1
[TABLE="width: 555"]
<tbody>[TR]
[TD]Generator Size[/TD]
[TD]1st Day[/TD]
[TD]Subs Days[/TD]
[TD]1 Week Hire[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]£677.85[/TD]
[TD]£29.61[/TD]
[TD]£855.51[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]£682.90[/TD]
[TD]£35.69[/TD]
[TD]£897.04[/TD]
[/TR]
[TR]
[TD]50[/TD]
[TD]£682.90[/TD]
[TD]£35.69[/TD]
[TD]£897.04[/TD]
[/TR]
[TR]
[TD]80[/TD]
[TD]£722.40[/TD]
[TD]£53.39[/TD]
[TD]£1,042.74[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]£722.40[/TD]
[TD]£53.39[/TD]
[TD]£1,042.74[/TD]
[/TR]
[TR]
[TD]150[/TD]
[TD]£1,025.53[/TD]
[TD]£90.57[/TD]
[TD]£1,568.95[/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]£1,025.53[/TD]
[TD]£90.57[/TD]
[TD]£1,568.95[/TD]
[/TR]
[TR]
[TD]250[/TD]
[TD]£1,535.61[/TD]
[TD]£152.08[/TD]
[TD]£2,448.09[/TD]
[/TR]
[TR]
[TD]320[/TD]
[TD]£1,535.61[/TD]
[TD]£152.08[/TD]
[TD]£2,448.09[/TD]
[/TR]
[TR]
[TD]500[/TD]
[TD]£2,134.46[/TD]
[TD]£243.95[/TD]
[TD]£3,598.16[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]£2,918.10[/TD]
[TD]£367.19[/TD]
[TD]£5,121.24[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]£2,918.10[/TD]
[TD]£367.19[/TD]
[TD]£5,121.24[/TD]
[/TR]
[TR]
[TD]1250[/TD]
[TD]£3,499.55[/TD]
[TD]£501.49[/TD]
[TD]£6,508.49[/TD]
[/TR]
</tbody>[/TABLE]
Tab 2
[TABLE="width: 1269"]
<tbody>[TR]
[TD]ZONE[/TD]
[TD]RESTORATION/PLANNED[/TD]
[TD]GENERATOR SIZE (KVA)[/TD]
[TD]DATE/TIME CONNECTED TO THE NETWORK[/TD]
[TD]DAYS CONNECTED[/TD]
[TD]PROVISIONAL COSTS[/TD]
[/TR]
[TR]
[TD]01-NORTHUMBERLAND & COUNTY DURHAM[/TD]
[TD]RESTORATION[/TD]
[TD]100[/TD]
[TD]29/06/2018 00:00[/TD]
[TD]22[/TD]
[TD]£1,299.66[/TD]
[/TR]
</tbody>[/TABLE]