+ Reply to Thread
Results 1 to 7 of 7

Whoever can solve this is a genius..PLEASE HELP!!

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    Pennsylvania
    MS-Off Ver
    2013
    Posts
    18

    Whoever can solve this is a genius..PLEASE HELP!!

    In column "A", I have entry dates. In column "C", I have the names of wholesalers. Column "E" has the formula for what I am trying to achieve which is below.

    =IFERROR(VLOOKUP(C2,Quota!B:O,LEFT(TEXT(A2,"m")+1),0)/(COUNTIF(C:C,C2)),0)

    What this formula is doing is looking up the name of the wholesaler in a separate table and then pulling the corresponding quota number based on what month is in column "A". It then proceeds to divide that calculation by the amount of times each wholesaler name shows up in the sheet. This formula works perfectly, except for one detail: I need the counts in the second half of the formula to reset once a new month changes. Right now, what the formula is doing is if the wholesaler has entries in January and February, then January's quota number(the formula above) is going to divide by the amount of time the wholesaler shows up in January and February, rather than having the count reset each month like I want it to, I hope this makes sense. Any help or direction is GREATLY appreciated!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    You could change the COUNTIF term to this:

    SUMPRODUCT(($C$2:$C$1000=$C2)*(MONTH($A$2:$A$1000)=MONTH($A2))

    Note that I've used a range from 2 to 1000, rather than a full-column range.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-20-2015
    Location
    Pennsylvania
    MS-Off Ver
    2013
    Posts
    18

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    Thank you so much Pete!

    2 things...

    1- Any reason taking the entire column won't work,(rather than 1-1000? Id need to do all of column e since the sheet spread well beyond 999 lines. Any attempt to chnage the range you gave me, gives me an NA result.... Please don't give up on me!

    2- Also, her is the formula I am now inputting, but I am getting a "need parentheses error). N ot sure why, but when i put it
    =IFERROR(VLOOKUP(E2,Quota!B:O,LEFT(TEXT(A2,"m")+1),0)/SUMPRODUCT(($C$2:$C$1000=$C2)*(MONTH($A$2:$A$1000)=MONTH($A2))

  4. #4
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    If you use whole column references, it will create a matrix of over 1 million entries. That takes time to process and you will see a noticeable lag when calculating your worksheet. In earlier versions of Excel, you were not allowed to use full column references with SUMPRODUCT. Now you are but it is not recommended.

    You would be better creating Dynamic Named Ranges for the data in columns A and C and referring to them instead of the full column references, or an arbitrary number of rows.

  5. #5
    Registered User
    Join Date
    03-20-2015
    Location
    Pennsylvania
    MS-Off Ver
    2013
    Posts
    18

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    Thank you all, after some playng around, I got his formula to work for the second part of it f being wholesalaer and b being date month:

    =VLOOKUP(F2,Quota!B:O,MONTH(A2)+1,0)/COUNTIFS(F:F,F2,B:B,B2)

  6. #6
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,704

    Re: Whoever can solve this is a genius..PLEASE HELP!!

    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)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. hello excel genius!!
    By anne.marian in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 04-17-2014, 05:23 AM
  2. [SOLVED] I need an array formula Genius, I think....
    By alfgrey in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-10-2014, 05:37 PM
  3. Excel genius
    By faisal123 in forum Excel General
    Replies: 1
    Last Post: 02-14-2013, 02:49 PM
  4. Chart Referencing (whoever can solve this is a Genius!)
    By wvpersephone13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2011, 03:37 PM
  5. I need help from a VBA genius ! I'm dying
    By Richard Flame in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2007, 08:11 PM
  6. VBA genius needed... Please help
    By bsnapool in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2006, 10:12 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