+ Reply to Thread
Results 1 to 9 of 9

MODE Function on a specific Match

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    MODE Function on a specific Match

    Hello,

    I have a large list of tenants down the page. Across the page I have 12 months of numbers related to their square footage. The Mode Function by itself works nicely when I am building out a table off of a data extract. The issue is how can I be certain the formula is picking up the right range? How can I make it more dynamic where it says Search this tenant on this data set. When you find it do a MODE on this range of cells?

    Regards,

    Anthony

  2. #2
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: MODE Function on a specific Match

    Sorry. This is my current formula

    =MODE(JDESqFtg!J2:U2)

    Very basic. Should I do an If statement with a vlookup and if it is found do a MODE?

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MODE Function on a specific Match

    Maybe something like this...

    Names in the range JDESqFtg!A2:A6
    Numeric data in the range JDESqFtg!J2:U6

    On some other sheet:

    A2 = some name

    This formula entered in B2:

    =MODE(INDEX(JDESqFtg!J2:U6,MATCH(A2,JDESqFtg!A2:A6,0),0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: MODE Function on a specific Match

    Works like a champ! Maybe Mode isn't the correct function to use? I have 12 months of a tenants square footage. If the tenant is vacant 9 months that is 9 zeros vs 3 months of square footage. I need the formula to do the match like you stated but I need it to look at 12 months and pull the appropriate square footage for that unit. I attached file as a reference. Look at the highlighted yellow row on both tabs. I need Romanos to pull 923. I almost need it to disregard zeros in the mode and do the most frequent number in the amounts greater than zero?
    Attached Files Attached Files

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MODE Function on a specific Match

    Ok, there's a slight problem...

    There are 2 instances of ROMANO'S JEWELERS. One on row 138 and the other on row 176 (which you have highlighted).

    The formula will find the first instance on row 138.

    Both instances have the same 2 numbers, 0 and 923, but not exactly the same count or sequence.

    So, which instance do you want to use for the calculation?

  6. #6
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: MODE Function on a specific Match

    Both. One is a lease ending on 3/31/2012 and the other is a lease start of 4/1/12 through 3/31/2015. It is the same tenant and space but it is a renewal with different dates. So you see the square footage on the first one (row 138) only through March and then you see the square footage on the second one (row 176) start on April through December.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MODE Function on a specific Match

    Try one of these this array formulas**:

    =MODE(IF(JDESqFtg!D$2:D$201=B183,JDESqFtg!J$2:U$201))

    If you want to exclude zero values:

    =MODE(IF(JDESqFtg!D$2:D$201=B183,IF(JDESqFtg!J$2:U$201>0,JDESqFtg!J$2:U$201)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  8. #8
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: MODE Function on a specific Match

    I believe that gets me the result I need. The formula excluding zeros. Thanks!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MODE Function on a specific Match

    You're welcome. Thanks for the feedback!

+ 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