+ Reply to Thread
Results 1 to 8 of 8

Count line if not Sunday and show zero if line empty

  1. #1
    Registered User
    Join Date
    05-19-2018
    Location
    Columbus, GA
    MS-Off Ver
    office 365
    Posts
    9

    Count line if not Sunday and show zero if line empty

    Been Tying to get column E to show amount on all days but Sunday and blank cells. Would like for it show 0 I did get it to show false on blank cells, haven't figured out how to get it to show zero or leave blank. Also file upload keeps failing this is the current formula =IF(J3<>"",$E$34/COUNT($I$3:$I$33))

    column J is the date, I is the day of the week and E34 is a total.

  2. #2
    Registered User
    Join Date
    05-19-2018
    Location
    Columbus, GA
    MS-Off Ver
    office 365
    Posts
    9

    Re: Count line if not Sunday and show zero if line empty

    file upload
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Count line if not Sunday and show zero if line empty

    Formula for E3 =IF(J3<>"",$E$34/COUNTIF($I$3:$I$34,1))
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,814

    Re: Count line if not Sunday and show zero if line empty

    Try this in E3:

    =IF(OR(J3="",WEEKDAY(A3,2)=7),"",$E$34/COUNT($I$3:$I$33))

    then copy down.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    05-19-2018
    Location
    Columbus, GA
    MS-Off Ver
    office 365
    Posts
    9

    Re: Count line if not Sunday and show zero if line empty

    That does solve the 0 on Sundays but it does still counts Sunday as a day in the count line. Its still counting as 28 days when there are really only 24 workdays with out Sundays. And to learn from this formula
    the WEEKDAY(A3,2)=7) part is that basically saying that the weekday starts on Monday then =7 is telling the end of the week?

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count line if not Sunday and show zero if line empty

    The basic Average if column I > 1 (not Sunday) should be:

    =$E$34/COUNTIF($I$3:$I$33,">1")

    If column A was Sunday or blank then hide:

    =IFERROR(IF(WEEKDAY(A3)=1,"",$E$34/COUNTIF($I$3:$I$33,">1")),"")
    Quang PT

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Count line if not Sunday and show zero if line empty

    Perhaps this in E3:E33.

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

  8. #8
    Registered User
    Join Date
    05-19-2018
    Location
    Columbus, GA
    MS-Off Ver
    office 365
    Posts
    9

    Re: Count line if not Sunday and show zero if line empty

    Thank you everyone for your answers. These have all answered my questions and letting me know I really Should take another excel class its been to many years.

+ 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. [SOLVED] Show data in Userform Textbox starting at line 1 instead of line 26
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2018, 01:02 AM
  2. Count the number of non empty line with macro
    By maliwari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2018, 02:35 AM
  3. [SOLVED] Empty sheet before updating but leave title line at top and totals line at bottom
    By rmarenyi in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-22-2017, 10:42 AM
  4. [SOLVED] Excel 2007 VBA - Multiple line header adds empty line in between
    By ChrisPatterson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2014, 08:54 AM
  5. [SOLVED] If one cell in line turn empty then entire line turns empty
    By Cristy0505 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-19-2013, 06:02 AM
  6. 2010 Line Chart Show Zero Value Line
    By erock24 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-27-2011, 08:54 PM
  7. Show line conditionally - Line Chart
    By idrisb59 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-20-2008, 12:45 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