+ Reply to Thread
Results 1 to 12 of 12

Multi-worksheet Complex 3D CountIF Help? VBA Solution?

  1. #1
    Registered User
    Join Date
    01-06-2017
    Location
    NZ
    MS-Off Ver
    2007
    Posts
    30

    Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    Hi all,

    I think a countif formula is what I require however I am open for suggestions and correction.

    attached is a form for scheduling of people in certain areas for week ranges across 2017, however I want to count the number of hours a certain individual is scheduled during a public holiday day.

    for example in sheet "Annual Leave & DIL" is a list of all public holidays for 2017. What I want to count is if Name 1 is scheduled on any of those days across the other sheets then it reflects the hours worked that shift.

    For this example on the sheet Week "15 - 18" date: 14/4/17 if Name 1 had either the code "PH" or 24 hour time in their row (Cells N11:O11) then in Cell B4 on sheet "Annual Leave & DIL" it would count the hours found in the cell P11 on Sheet "Week 15 - 18".

    Any suggestions or advice or even if you had the time to put together the formula on the attached sheet that would be greatly appreciated!

    Regards,
    Marc
    Attached Files Attached Files
    Last edited by AliGW; 04-10-2017 at 05:06 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,356

    Re: CountIF Help?

    Can a "name" have "PH" in more than one Sheet (so in "Annual Leave & DIL" there would be multiple entries for such a "name") ?

    At this point, I think you might need VBA to achieve this.

  3. #3
    Registered User
    Join Date
    01-06-2017
    Location
    NZ
    MS-Off Ver
    2007
    Posts
    30

    Re: CountIF Help?

    Yes this is correct so sheet "Week 15 - 18" could have multiple entries on a PH column, they could have PH entered in their row along multiple sections and they could also have other entries from other "Week" sheets to add to this.

    VBA is something I haven't worked with so would need some solid guidance if that is possible..

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,356

    Re: CountIF Help?

    To me this a fairly complex "search/match" which requires identification of which sheet to search, match all the "HD & "DIL" entries and construct the "Annual Leave and DIL" table: the latter will (can) have multiple entries for each name.

    For example "Name 1" has "PH"/"DIL" entries in "Week 15 - 18" but could have similar entries in any other period (?).

    It would help if you could add some manual entries to the "Annual Leave & DIL" table, including multiple entries for "name 1" (as an example).

    As per my previous most, I am sure this will require a VBA solution (and although I have some VBA knowledge) you may wish to consider closing this thread and re-posting on the the VBA/Macro thread.

    Or wait to see if anyone on this forum offers a solution (formula/VBA).

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: CountIF Help?

    There is no need to close this thread! If it needs moving to the VBA section, I can do that - just ask here, please.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    01-06-2017
    Location
    NZ
    MS-Off Ver
    2007
    Posts
    30

    Re: CountIF Help?

    This would be fantastic if this can be moved to the VBA section for someone with detailed VBA background could possibly help. Many thanks for your help so far team.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,356

    Re: CountIF Help?

    @Ali: sorry .... was not sure of process for moving thread: in future I will refer to a moderator to do the necessary. Lesson learned!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    Thread moved and title changed to (hopefully!) properly represent the issue and attract the right helper.

    @John - no need to apologise! It's the best way to avoid duplication of threads, I find.

  9. #9
    Registered User
    Join Date
    01-06-2017
    Location
    NZ
    MS-Off Ver
    2007
    Posts
    30

    Re: Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    Thanks Ali for the shift and the advice/help so far.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    You're welcome.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,356

    Re: Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    As per my post #4: it would be helpful if you could update your file with sample (expected results) data.

  12. #12
    Registered User
    Join Date
    01-06-2017
    Location
    NZ
    MS-Off Ver
    2007
    Posts
    30

    Re: Multi-worksheet Complex 3D CountIF Help? VBA Solution?

    Hi thanks for that, I have updated my sheet with comments in the sheet "Annual Leave & DIL" to show where I got these numbers from and what results I would like to show, however again open for suggestions.

    Also keep in mind that I have only put the comments in for what is on the multiple sheets currently, there will be further inputs, codes and 24 hour times to be added as the year goes on so this will need to auto update as things are added etc.

    and also the formulas would have to apply for all the names.
    Attached Files Attached Files
    Last edited by Mrmarc; 04-10-2017 at 06:16 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need a solution for a complex excel live report
    By Benjiboi_87 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-09-2016, 05:50 PM
  2. Complex Solution.
    By deepusurana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2011, 07:05 AM
  3. Trying to find out a solution for a complex formula
    By Weasel in forum Excel General
    Replies: 4
    Last Post: 03-22-2006, 03:41 PM
  4. [SOLVED] Hlookup or Vlookup problem? or wich other solution? Complex Proble
    By Micos3 in forum Excel General
    Replies: 2
    Last Post: 03-06-2006, 12:40 PM
  5. [SOLVED] Complex Formula Solution using Search and IF
    By XP in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2006, 12:25 PM
  6. Help wih complex formula or macro or solution
    By Sal Young in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2005, 05:05 PM
  7. [SOLVED] Help with complex formula or macro or solution
    By Sal Young in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2005, 12:05 PM

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.6.0 RC 1