Remember Me?

#1
September 15th 15, 09:38 PM
 Junior Member First recorded activity by ExcelBanter: Sep 2015 Posts: 2
nested if function

Hi all, I have a spreadsheet and am trying to calculate hours worked using 2 sheets.
sheet1 is entitlement calculation and sheet2 is public holidays

starting in sheet 1 cell b12 hours started is 01-oct-2015 then sum public holidays rage b2:b9 it just sums the holidays after 30-sep-2015 and get the correct answer which is 7 because the range is
Day Date Hours worked
Friday 03/04/2015 3.5
Monday 06/04/2015 0
Monday 04/05/2015 3.5
Monday 28/09/2015 0
Friday 25/12/2015 3.5
Monday 28/12/2015 0
Friday 01/01/2016 3.5
Monday 04/01/2016 0

however the next entry in cell b12 of sheet 1 may be 01-may-2015 in which case the answer would be 10.5 does this need vb code or does anyone know how to do this using a function. any help would be much appreciated

#2
June 30th 21, 11:39 AM
 Member First recorded activity by ExcelBanter: Jun 2021 Posts: 47
Sumif

I'm not sure if I understood your question, but I think you just need to use SUMIF Function in Excel to add the hours worked for the holiday in question.

So if you have a designated Column for Holiday or not, then you can use SUMIF to check if a certain date is a holiday. Then proceed as is.

Hope this helps!

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post Jennifer E Excel Discussion (Misc queries) 1 April 11th 10 12:15 PM Mary S Excel Worksheet Functions 4 April 6th 10 04:48 PM anna Excel Worksheet Functions 4 May 27th 06 06:06 AM MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM carl Excel Worksheet Functions 2 December 29th 04 09:57 PM

All times are GMT +1. The time now is 03:49 PM.