+ Reply to Thread
Results 1 to 5 of 5

Broken ROUUNDUP or VLOOKUP formula

  1. #1
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Broken ROUUNDUP or VLOOKUP formula

    Morning!

    I have a formula that seems to be working, through much brute force and little finesse. However, one row of the code seems to be broken, and I'm perplexed as to why.

    I included a sample file, with the problem row highlighted in yellow. The results of this row should show the number "1" after the person is hired; however, I'm getting the "#N/A" message. The formulas above and below this row seem to work fine. I built the formula in cell D6 and simply copied/pasted down and across.

    Any thoughts? Thank you very much, if you do.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Broken ROUUNDUP or VLOOKUP formula

    the last argument in the first vlookup is missing if that returned n/a then the IF will stop at that point
    =IF(AND(YEAR(C$5)>=2013,YEAR(C$5)<=2016,C8>0),IF(D$2=0,C8,ROUNDUP(D$2/(VLOOKUP($B8,Control!$B$2:$G$26,MATCH(YEAR(D$5),Control!$B$2:$E$2,0),FALSE)),0)),IF(VLOOKUP($B8,Control!$B$2:$G$26,6,FALSE)=D$5,1,0))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-11-2014
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Broken ROUUNDUP or VLOOKUP formula

    This Formula seems to be over-evolved
    Please tell me in words, what does it do? when do you want "1", when "-"
    Regards
    pascal

  4. #4
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: Broken ROUUNDUP or VLOOKUP formula

    Hi paesu57,

    You're right about the formula being over-evolved! In fact, I lost my way through its complication.

    In words, I want the formula to do one of three things...

    1. If the month prior to the current month is >0, and the Current Month Production value =0, then either paste the prior month's value
    2. If the month prior to the current month is >0, and the Current Month Production value >0, then calculate a new value based on the current month's production and that position's hiring metric (e.g., 200 for Regional Sales Manager).
    3. If the month prior to the current month is <>0, then look to see if that position has a hire date for the current month, from the Control sheet.

    If none of these three criteria are >0, then show "0".

    I made it more complicated with the "2013" and "2016" references because I didn't want a separate formula for the first month (e.g., January 2014).

    Thanks for your help.

  5. #5
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: Broken ROUUNDUP or VLOOKUP formula

    martindwilson,
    Thanks for the simple fix. Although my formula is over-thought (and written), you saw through my clutter and found the missing ingredient. Thanks for that!

+ 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] Formula to count unique strings broken down by month
    By Cabs1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2014, 10:34 AM
  2. formula to output upcoming quarter end date (for a broken fiscal year)
    By canaille in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2014, 05:01 PM
  3. Broken Formula
    By mtndewgradon in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2013, 02:42 PM
  4. [SOLVED] Broken Count formula
    By Notters in forum Excel General
    Replies: 1
    Last Post: 08-21-2012, 09:06 AM
  5. Replies: 16
    Last Post: 02-24-2012, 03:08 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