+ Reply to Thread
Results 1 to 6 of 6

Thread: Calculating Date and Numeric values

  1. #1
    Registered User
    Join Date
    08-20-2011
    Location
    Kinver, West Midlands
    MS-Off Ver
    Excel 2007
    Posts
    9

    Calculating Date and Numeric values

    I have a worksheet with the first column showing dates in blocks of 5 at a time (working week)
    There is a space of two rows between each block.
    The date column runs for a complete year.

    There is another column which shows a total of hours worked per week (sum of 5 working week columns)

    I wish to create two date cells and one numeric cell, which is based on ---

    IF first date cell is equal to ANY date in my first column, AND IF the second date cell is equal to ANY date in the same column, my numeric cell will show the SUM of all hours in my total hours worked column for that period.

    I have tried - =IF(F4=A10:A265,and J4=A10:A265,J10:J265) but it doesnt work

    If I apply this formula to a block of dates (5 only) with no blank rows, then it appears to work.

    Am I on the right track, or can someone advise me other please.

    Thank you

    Ian
    Last edited by IanDGreen; 08-20-2011 at 02:20 PM. Reason: Not conforming to rules

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Help with IF function needed

    awaiting reply to moderator's request

  3. #3
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Help with IF function needed

    @Richard: apologies, working on formula and didn't refresh the thread.

    Regards

  4. #4
    Registered User
    Join Date
    08-20-2011
    Location
    Kinver, West Midlands
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Help with IF function needed

    Quote Originally Posted by TMShucks View Post
    @Richard: apologies, working on formula and didn't refresh the thread.

    Regards
    Hi TM Shucks
    Just got your response by email, but unable to find it in here.

    Your answer was BRILLIANT qand has solved my problem big time.

    Thank you

    Ian

  5. #5
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Calculating Date and Numeric values

    Thanks for changing the thread title as requested.

    One way:

    =IF(AND(COUNTIF($A:$A,F4)>0,COUNTIF($A:$A,J4)>0),SUM(INDEX($B:$B,MATCH(F4,$A:$A,0)):INDEX($B:$B,MATC H(J4,$A:$A,0))),"One or more dates not present")


    Regards

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Calculating Date and Numeric values

    Thanks for the rep.

    If this has answered your question, please mark your thread as solved.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0