+ Reply to Thread
Results 1 to 6 of 6

Count number of days minus Friday and or Saturday

  1. #1
    Registered User
    Join Date
    12-30-2012
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    31

    Question Count number of days minus Friday and or Saturday

    Dear All,

    I would like to calculate number of days minus friday and or saturday between two given dates in excel.

    Secondly, in my excel file i have around 30 to 40 worksheets, now I want to display the name of worksheet in a cell A1 in each worksheet. Below formula is written in A1 of each worksheet and what happens is, when i edit formula and press return key, it fetches the displayed name of the worksheet and next when i move to other worksheet, even this has the same value in A1 as of previous worksheet.

    What I want is: Sheet1!A1 should display Sheet1, Sheet2!A1 should display Sheet2..

    Formula: =MID(CELL("filename"),FIND("]",CELL("filename"))+1,30)

    Request your expert advice on both of my queries.

    Rgds, Anil

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Count number of days minus Friday and or Saturday

    I am addressing both your questions but in the future you should open two threads, because these questions are completely unrelated.

    Dates

    This formula shifts NETWORKDAYS to work with a Friday/Saturday weekend:

    =NETWORKDAYS(C2+1,D2+1)

    (In Excel 2010 NETWORKDAYS.INTL was introduced allowing this to be built in.)

    Sheet Names

    I used your formula in my own workbook and it worked perfectly. I don't see a problem. Can you attach your file?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-30-2012
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    31

    Re: Count number of days minus Friday and or Saturday

    Thanks for the formula.. I have attached excel file sample.xlsx.

    In this file, if i try to bring sheet1 name and move to sheet two refresh the value, you will notice all the tabsheets will have same name.

    Rgds, ANil

    Moderators Note:
    • As per Forum Rule #12, please don't quote whole posts unless necessary-- it's just clutter...Thanks.
    Attached Files Attached Files
    Last edited by jeffreybrown; 01-21-2013 at 06:25 PM.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of days minus Friday and or Saturday

    For the sheet name, you have to include a cell reference:

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,31)

    The file must have been saved and given a name before this will work.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Count number of days minus Friday and or Saturday

    I confirmed your problem and I have no idea what is going on. When I tried it on my own file, each sheet looked fine but I did not go back and look at Sheet1 but it indeed did say Sheet3.

    I have started a new thread with this question on your behalf. I suggest you subscribe to it to see any answers that may come up.

    I did not preview so I didn't see Tony Valko's answer before I posted, but I confirmed it. I do not know why because the range reference is an optional argument, but that does solve the question.
    Last edited by 6StringJazzer; 01-21-2013 at 06:21 PM. Reason: Added blue text

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of days minus Friday and or Saturday

    Or, you could read post #4!

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