+ Reply to Thread
Results 1 to 10 of 10

Data Validation IF function

  1. #1
    Registered User
    Join Date
    10-27-2014
    Location
    Coimbatore, India
    MS-Off Ver
    2007+2013
    Posts
    59

    Data Validation IF function

    I have attached an excel file (dattest1)
    Col B contains Paid Leave dates for the factory (max 4 days in a month not exceeding 12 days in a year).
    Col D contains calender days.
    The formula in col F checks whether the date is a paid leave ("Yes") or not ("No"). The formula is somewhat lengthy and I
    feel this could be simplified further.
    I have tried to simplify (formula in col E) but the results are incorrect.
    I request the experts to suggest whether the simplification of the formula in col F is possible.
    Last edited by rviji.cbe; 05-25-2015 at 06:42 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Formula simplification

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Formula simplification

    attach file is missing??

  4. #4
    Registered User
    Join Date
    10-27-2014
    Location
    Coimbatore, India
    MS-Off Ver
    2007+2013
    Posts
    59

    Re: Formula simplification

    I have attached the file but missing somehow... I am trying again to upload it.

  5. #5
    Registered User
    Join Date
    10-27-2014
    Location
    Coimbatore, India
    MS-Off Ver
    2007+2013
    Posts
    59

    Re: Data Validation

    I hope the file is uploaded now.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,058

    Re: Data Validation IF function

    I don't understand why you have the public holidays scattered all over the place. It'd make more sense to have them in adjacent cells. However, even in their current arrangement, this shouls simplify matters:

    =IF(ISERROR(MATCH(D33,PHDays,0)),"No","Yes")
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 05-25-2015 at 07:06 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Data Validation IF function

    other alternatives

    =IF(SUMPRODUCT(--($B$3:$B$50=D3)),"Yes","No")

    =IF(COUNTIF($B$3:$B$50,D3),"Yes","No")

  8. #8
    Registered User
    Join Date
    10-27-2014
    Location
    Coimbatore, India
    MS-Off Ver
    2007+2013
    Posts
    59

    Re: Data Validation IF function

    The last suggestion i.e. =IF(COUNTIF($B$3:$B$50,D3),"Yes","No") works fine. I never imagined that the COUNTIF function can be used like this. Thank you very much for the instant help.
    Last edited by rviji.cbe; 05-25-2015 at 08:30 AM.

  9. #9
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Data Validation IF function

    there are few more if u wana try out

    =IF(SUM(--INDEX($B$3:$B$50=D3,,)),"y","n")

    =IF(ISNUMBER(MATCH(TRUE,INDEX($B$3:$B$50=D4,,),0)),"y","n")

  10. #10
    Registered User
    Join Date
    10-27-2014
    Location
    Coimbatore, India
    MS-Off Ver
    2007+2013
    Posts
    59

    Re: Data Validation IF function

    Thanks a lot.....
    I am unable to mark it as solved and request the moderators to mark it as solved.

+ 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] modification & simplification of existing formula
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 03-12-2014, 08:17 AM
  2. Sumif formula Simplification
    By Tristanfrontline in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-26-2014, 12:56 AM
  3. [SOLVED] Formula Simplification
    By brharrii in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2013, 10:46 AM
  4. Formula Simplification
    By nanocrazy in forum Excel General
    Replies: 2
    Last Post: 04-16-2010, 03:14 AM
  5. Simplification of SUMPRODUCT formula
    By Spellbound in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2009, 10:08 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