Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default trying to sum range in one sheet depending on the date in cell on other sheet

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

I am trying to sum the hours worked on sheet2 "public holiday" range c2 ; to c9 depending on the date on cell B12 of sheet 1 "entitlement calculation"
starting in with the date in sheet 1 "entitlement calculation" cell b12 as shown in the sample below

SAMPLE: Sheet 1.."entitlement calculation" cell B12 is the start date which could be the 1st of any month..in the sample case it is 01-Oct-2015 which then sums the range hours worked (c2:c9) starting at date 30-sep-2015 (c6) which gives 7 hours which is correct,
however the next entry into cell B12 might be 01-may-2015 which would sum range hours worked from 30-apr-2015 which would be (c4:c9) which would give 10.5 hours.


sheet 2 is public holidays as shown below.

COL A COL B COL C
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

I have tried using various if statements but cant get the correct answer for all options..any help would be much appreciated..thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default trying to sum range in one sheet depending on the date in cell on other sheet

Hi,
Am Wed, 23 Sep 2015 09:47:39 +0100 schrieb tomtic56:

COL A COL B COL C
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


try in "public holiday"
=SUMIF('entitlement calculation'!B:B,"="&B12,'entitlement calculation'!C:C)


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
compare value of cell in one sheet to range of another sheet Matthew Dyer Excel Programming 3 March 12th 10 03:41 AM
Select data to appear on 2nd sheet by date range... Cbreze Excel Discussion (Misc queries) 0 June 28th 07 12:10 AM
Post to a Sheet Depending on a Value within a Cell Q Sean Excel Programming 5 April 17th 07 12:35 PM
Open specific sheet depending on cell contents monkey harry Excel Programming 3 May 2nd 06 04:45 PM
Date Range for my time sheet PamelaT Excel Worksheet Functions 2 February 27th 06 02:20 PM


All times are GMT +1. The time now is 10:01 AM.

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"