+ Reply to Thread
Results 1 to 10 of 10

Edit my complicated UDF to count an extra error

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Edit my complicated UDF to count an extra error

    Hello everybody,
    Could you help me in my question,please?
    Explaining the file:
    -The file contains dates of leaves for employees.
    -The dates are written in format of "00" like "01+02"
    CountErrors UDF is used to count errors:
    1-count duplicate dates for each employee
    2-Check for format:counts the error in the format of dates, like "1,2,3", they should be written like this "01+02+03"
    3-Can only contain a slash if it's in "substitution" or "of" columns
    4-Why get permission if you have balance on your leave?

    My question:
    I need the UDF to count an extra error:
    In "substitution" and "of" columns,if the date contains a "/" , date format(before and after the slash) should be "0" not "00"
    For example:
    Wrong >>>>> TRUE
    06/2 >>>>> 6/2
    10/02 >>>>> 10/2
    07/01 >>>>> 7/1
    See the attachement
    Attached Files Attached Files
    Last edited by leprince2007; 01-18-2019 at 03:54 AM.

  2. #2
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Edit my complicated UDF to count an extra error

    Is there something not clear?
    Is there somebody trying to help me?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Edit my complicated UDF to count an extra error

    I have asked some members to take a look at this for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Edit my complicated UDF to count an extra error

    Thank you very much Mr.FDibbins for your help.I`am very grateful to you.

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Edit my complicated UDF to count an extra error

    I'm not re-posting the entire thing, look for this section near the end of your code and insert the lines in red.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Edit my complicated UDF to count an extra error

    well done jason.b75 thanks a lot

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Edit my complicated UDF to count an extra error

    You're welcome!

    There is at least one other potential error that you haven't noticed (try entering a leave date of Feb 30)

    There may be others, but the one above, in my opinion, is unfixable with such a poor sheet layout.

    edit:-

    If you want a more flexible sheet, this template appears to be quite a popular starting point, I've seen a number of members of this forum using it https://trumpexcel.com/excel-leave-tracker/
    Last edited by jason.b75; 01-20-2019 at 06:13 AM.

  8. #8
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Edit my complicated UDF to count an extra error

    Thank you jason.b75 for your note
    Could you offer me another efficient workbook to handle leaves?

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Edit my complicated UDF to count an extra error

    See the link in my previous post.

  10. #10
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Edit my complicated UDF to count an extra error

    Thank you very much for your advice.I will try to apply it

+ 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. Replies: 2
    Last Post: 11-07-2017, 11:32 AM
  2. Edit my complicated UDF &I have a problem in recalculating it
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2017, 10:44 AM
  3. [SOLVED] Count if above amount and multiply extra by %
    By HelenClark in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-09-2016, 09:34 AM
  4. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  5. Count excluding duplicates with an extra condition
    By konradk in forum Excel General
    Replies: 2
    Last Post: 09-20-2011, 10:39 AM
  6. Edit code to add extra criteria
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2008, 11:34 AM
  7. complicated count
    By gwiz in forum Excel General
    Replies: 4
    Last Post: 02-20-2007, 09:17 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