+ Reply to Thread
Results 1 to 3 of 3

If(AND) Nested Function long and complicated. Looking for simpler way if there is

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    MTL
    MS-Off Ver
    Excel 2007
    Posts
    16

    If(AND) Nested Function long and complicated. Looking for simpler way if there is

    Hello everyone,

    Right now I have forecasts in one row, dates in another and I would like to assess the impact of a change in approval date (date when sales will start) to the revenue stream (forecasted). However, I would like to split this imoact per fiscal year (which ends May 31st).

    I used the following formula:

    =SUMIFS(A1:Z1,A2:Z2,">="&S3,A2:Z2,"<="&U3,A2:Z2,IF(AND(D1<DATE(YEAR(D1),5,31),D2<DATE(YEAR(D1),5,31)),"",IF(AND(D1<DATE(YEAR(D1),5,31),D2>DATE(YEAR(D1),5,31)),"<="&DATE(YEAR(D1),5,31),IF(AND(D1>DATE(YEAR(D1),5,31),D2>DATE(YEAR(D1),5,31)),"<="&DATE(YEAR(D1)+1,5,31),"Error"))))

    where

    A1:Z1 are my forecasts
    A2:Z2 are my dates
    D1 is the first (initial) date
    D2 is the second (modified) date

    The formula works properly, however, I would like to know if there is a way to simplify it so that others can understand it more easily.

    Thank you for any help you may give,

    Coco

  2. #2
    DaveDeV
    Guest

    Re: If(AND) Nested Function long and complicated. Looking for simpler way if there is

    Hi Coco,

    Your details regarding cell allocation don't make sense as the first date lies within the range of your forecasts and second date lies within the range of your dates (both would be the fourth entry in their respective rows).

    Please post a copy of the workbook - it does make life a bit easier than trying to visualize your data in a matrix.

    Dave

  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,929

    Re: If(AND) Nested Function long and complicated. Looking for simpler way if there is

    Im a little confused by what you are trying to do with this part?

    AND(D1<DATE(YEAR(D1),5,31)
    D1 apparently has a date in it becasue you are comparing it with a date...that you get from D1??
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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