+ Reply to Thread
Results 1 to 10 of 10

If Weekend Day, Count Another Cell

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    If Weekend Day, Count Another Cell

    Hi everyone,

    This one is puzzling me, am sure I may have found the solution @ one stage but am losing my mind here lol
    I want to check if cells belong to a weekend day, if they do I want to count the content of another cell ie:

    A1:I9 is the days of a roster (Fri,Sat,Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue)
    In A2:I2 is the number "1" for days I am rostered on,
    If upper cells equal a weekend day, I want to check to see if a "1" is in the cell below, if so count it!

    example.jpg

    Any Help is much appreciated & I thank you in advance,
    Chad
    Last edited by chad328; 07-22-2014 at 09:16 PM.

  2. #2
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: If Weekend Day, Count Another Cell

    As per your example screenshot, try,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ** This is an array formula, confirm it by pressing Ctrl+Shift+Enter after entering the formula into an adjacent cell and copy down for all rows
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: If Weekend Day, Count Another Cell

    Try this...
    No array

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    assuming ...
    $A$2:$I$2 are date range

    $A$4:$I$4 is a row populated with 1 or ""


    Don't forget to click *

  4. #4
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    Re: If Weekend Day, Count Another Cell

    Sorry re not coding correctly, I have attached a spreadsheet as I get # value
    Thank you for taking the time to respond.

  5. #5
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    Re: If Weekend Day, Count Another Cell

    Thank you for taking the time to respond Vikas,
    I have attached a sheet as I am getting #Value error

  6. #6
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    Re: If Weekend Day, Count Another Cell

    Here's attachment:


    Please Login or Register  to view this content.
    Edit: Just realised the formula I was going to use was only ever going to count the weekdays & not the "1" in the cells below
    Attached Files Attached Files
    Last edited by chad328; 07-22-2014 at 11:06 PM.

  7. #7
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    Re: If Weekend Day, Count Another Cell

    Objective 1: Check A1:I1 (for any weekend days, ie sat or sun)
    Objective 2: If there are weekend days, count those that have a "1" below them

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,594

    Re: If Weekend Day, Count Another Cell

    To attach a Workbook
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  9. #9
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: If Weekend Day, Count Another Cell

    Our Formulas wasn't wrong...
    You changed your base data...
    we used dates to calculate that..
    let it be..

    try the new formula..

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    96

    Re: If Weekend Day, Count Another Cell

    Thank you all that contributed, Vikas you my friend are a genius, I thank you!

+ 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. Excel date without weekend count
    By Teuntja123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2014, 08:51 AM
  2. Replies: 1
    Last Post: 01-09-2014, 06:05 PM
  3. [SOLVED] Sum Weekend and Holiday Values Based on a Date Range in another Cell
    By GiGi320 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2012, 11:53 AM
  4. [SOLVED] Weekend nightmare how to work out week day and weekend rates Help Please
    By Sherburn Systems in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2012, 06:07 AM
  5. count number of days including weekend
    By craig@help in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 1
    Last Post: 08-30-2006, 09:32 AM

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