Results 1 to 3 of 3

Nested If with Multiple Indexes based on Date Ranges

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2007
    Posts
    17

    Nested If with Multiple Indexes based on Date Ranges

    Hello! I hope I get an accurate description out of the gates. I have attached a sample of the worksheet and formula's I am working with.

    1) Here is first formula with error:

    =IF(AND($Y18>="C",D$4>0),INDEX(LBCensus!$B$1:$ID$25000,MATCH($B18,LBCensus!$B$1:$B$25000,0),MATCH(DATE(YEAR($T18),MONTH($T18)+D$4,DAY($T18)),LBCensus!$B$1:$ID$1,0)),IF(AND($Y18>="N",D$4>0),INDEX(LBCensus!$B$1:$ID$25000,MATCH($B18,LBCensus!$B$1:$B$25000,0),MATCH(DATE(YEAR($T18),MONTH($T18)+D$4,DAY($T18)),LBCensus!$B$1:$ID$1,0)),IF(AND($Y18>="R",D$4>0),INDEX(LBCensus!$B$1:$ID$25000,MATCH($B18,LBCensus!$B$1:$B$25000,0),MATCH(DATE(YEAR($V18),MONTH($V18)+D$4,DAY($V18)),LBCensus!$B$1:$ID$1,0)),IF(AND($U18>0,$V18=0),0,0))))

    Located in Col D:Col O of LBR sheet.

    Appears to be working until it has to read from Col V rather than Col T.
    So, I see it break beginning in Row 14 where it returns an error #N/A.
    Row 15 where it is still reading from Col T rather than Col V.
    Row 18 where it is returning #N/A (because there are no date ranges to match the Hdate in Col T to the LBCensus range referenced.

    Desired result:

    Read from Col T wherever Col Y = a value of N or C, but if no valid dates in range result is 0.
    Read from Col V wherever Col Y = a value of R.
    If Col U has a value >0, return 0 for any dates except those with a value prior to Col U.

    Any help that can be provided would be greatly appreciated! Been working on this one for too long!
    Attached Files Attached Files

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