+ Reply to Thread
Results 1 to 4 of 4

If or Lookup condition

  1. #1
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    If or Lookup condition

    Dear all,
    Please help me on that:
    I made equation from R7 till R19, which get me the highest sales item each month, because I have more than 2 million items.
    But when I change the group in B2 to “TYP”, that equation gives me wrong results.
    So I need to add to that equation a condition: to start only from “Row Labels” in column A till “Grand Total”
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If or Lookup condition

    Why are you bothering with a separate analysis range when you are already using a Pivot Table. Seems like the proverbial sledgehammer/nut scenario.

    Either change the Value Field setting in the PT from Sum to Max, or if you want both add a second Value Field for Sales and set it to Max
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If or Lookup condition

    - Right click on Pivot table
    - Pivot table options -- Totals & Filters -- Uncheck 'Show grand totals for columns'

    Then in R7 use
    =IFERROR(INDEX(A:A,MATCH(MAX(INDEX(B:M,,MATCH(Q7,$B$5:$M$5,0))),INDEX(B:M,,MATCH(Q7,$B$5:$M$5,0)),0)),0)

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    Re: If or Lookup condition

    Thanks a lot for the equation,

    but when I am trying to use the Year in the Column Labels in Pivot Table, the equation gives me 0 for Jan.

    Can you please solve it to me.

    Example:

    Pivot Table:
    in column table:
    Year
    Month
    Last edited by zeez36; 04-22-2014 at 04:46 AM.

+ 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. multi condition format? lookup and date condition valid for.
    By D_Rennie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2009, 11:37 AM
  2. Lookup using condition
    By shabbir in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2008, 10:34 PM
  3. Max value if condition lookup
    By robotball in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2007, 11:27 PM
  4. [SOLVED] Sumproduct - Condition based on lookup of a Lookup
    By Hari in forum Excel General
    Replies: 13
    Last Post: 05-31-2006, 04:30 AM
  5. [SOLVED] condition Lookup help
    By Paul T in forum Excel General
    Replies: 6
    Last Post: 07-24-2005, 01:05 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