+ Reply to Thread
Results 1 to 5 of 5

Conditional Formula

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    Los Angeles, California
    MS-Off Ver
    MS Office 2010
    Posts
    17

    Conditional Formula

    I am trying to put together a conditional formula which will return a value if the condition met is the first WORKDAY of the beginning of the month. If the condition is not met the value will return a "$0".

    For example if the date is the condition and A1 is 3/1/2015 (Sun), B1 is 3/2/2015 (Mon), and C1 is 3/3/2015 (Tues) and the value I'm trying to return if the condition is met is $10,000 (which is in D5 ), the formula (in A5, B5, and C5) should return $0, $10,000, and $0 in the three respective cells.

    I've tried creating formulas around the =WORKDAY(EOMONTH(A1,-1),1) command but I can't get anything to work properly. Can someone please help me with how to do this? Thanks so much!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,662

    Re: Conditional Formula

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional Formula

    Quote Originally Posted by protonLeah View Post
    =if(and(weekday(a1)=2,day(a1)<=7),10000,0)
    That works if the first workday of the month is a Monday.....but not in other cases.

    I think your WORKDAY formula is on the right track, try this formula in A5 copied across

    =IF(A1=WORKDAY(EOMONTH(A1,-1),1),$D$5,0)
    Audere est facere

  4. #4
    Registered User
    Join Date
    02-09-2015
    Location
    Los Angeles, California
    MS-Off Ver
    MS Office 2010
    Posts
    17

    Re: Conditional Formula

    I received this formula which seems to work:

    =(A1=WORKDAY(EOMONTH(A1,-1),1))*$D5

    In a similar vein, does anyone know how to create a formula which returns a value based on the condition that it is the 18th of the month with the caveat that the 18th is a workday. If the 18th is not a workday, the formula should return the value corresponding with the last workday before the 18th. (e.g. on Friday if the 18th is a weekend or the day before a holiday if the 18th is a holiday). All other cells that don't meet the condition should return "$0".

    In other words, I am compiling a budget forecast with a fixed expense that hits every month on the 18th, and I need a formula which will return the appropriate value on that day or on the latest previous workday if the 18th is a weekend or holiday. Thanks!

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional Formula

    Quote Originally Posted by mctighe View Post
    .....based on the condition that it is the 18th of the month with the caveat that the 18th is a workday. If the 18th is not a workday, the formula should return the value corresponding with the last workday before the 18th. (e.g. on Friday if the 18th is a weekend or the day before a holiday if the 18th is a holiday)..
    That's effectively the same as allocating the value to the first working day before the 19th so this formula would do that

    =(A1=WORKDAY(A1-DAY(A1)+19,-1))*$D5

    If you want to consider holidays you need to add a holiday range in to the WORKDAY function

+ 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. formula help - conditional format to colour cell = count = formula
    By rangeruk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-23-2015, 09:03 PM
  2. Replies: 3
    Last Post: 11-28-2013, 02:11 AM
  3. Replies: 15
    Last Post: 04-10-2012, 07:30 AM
  4. Changing conditional average formula to conditional sumproduct
    By chlor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2007, 11:39 AM
  5. Replies: 6
    Last Post: 03-12-2006, 06:30 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