+ Reply to Thread
Results 1 to 7 of 7

Wildcard to count days and weekends

  1. #1
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Wildcard to count days and weekends

    I am trying to count the number of days and weekends that are in a cell but I can't see to figure it out. Attached is an excel file showing the results that I manually typed in. Is there a way to create formulas to do this? I tried an if function but because the cell contains more than one day it will not give me the results I need. I tried the wildcard function but it would not work with the If formula. I can't figure out the Find and Search formulas so I am hoping someone can help.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Wildcard to count days and weekends

    I can't figure out what you are trying to calculate.

    Shouldn't Sun, Mon be = 1 day and 1 weekend?

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Wildcard to count days and weekends

    Try this in C5:

    =LEN(B5)-LEN(SUBSTITUTE(B5,",",""))+(LEN(B5)>0)

    in D5:

    =SUM(COUNTIF(B5,{"*Sat*","*Sun*"}))

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Wildcard to count days and weekends

    Oh I get it now.

  5. #5
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Re: Wildcard to count days and weekends

    The days input in the column were input by other users so I am trying to convert them to the results I need. For example, if Sat, Mon and Thurs, are in the cell, I want to show 3 days and 1 weekend day. If the cell shows Sat, Sun, Mon, Tues, I want the result to show 4 days and 2 weekends. I hope that helps.

  6. #6
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: Wildcard to count days and weekends

    Or these:

    =SUM(COUNTIF(B5,TEXT({0,1,2,3,4,5,6},"\*ddd\*"))) to count days

    =SUM(COUNTIF(B5,TEXT({0,1},"\*ddd\*"))) to count weekends

  7. #7
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Re: Wildcard to count days and weekends

    Brilliant! 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. [SOLVED] Count number of days excluding weekends
    By Shahbazk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-27-2017, 04:14 AM
  2. Count Number of Days excluding Weekends (and more!)
    By eyjei in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-03-2017, 03:47 AM
  3. [SOLVED] Count days elapse using if isblank statement that excludes weekends
    By jedaicore in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-31-2014, 09:05 PM
  4. Count Working days by subtracting bank holidays and weekends
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-08-2014, 07:40 AM
  5. [SOLVED] Count Sickness days excluding weekends
    By Cliff Gathern in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 04:18 AM
  6. [SOLVED] Count only work days, not weekends
    By greenjl7 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2013, 11:56 AM
  7. Replies: 2
    Last Post: 04-08-2005, 03:06 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