+ Reply to Thread
Results 1 to 6 of 6

Formula to populate cells based on largest number to smallest

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Formula to populate cells based on largest number to smallest

    Hi,

    In the attached sheet i need a formula to look up the number in column A and then for the 2 highest numbers populate column B with 8, the next 2 highest numbers, populate column b with 6, the next 2 populate column b with 4 and then the last 2 populate column b with 2.

    Is there a formula that will do this?

    regards
    Attached Files Attached Files

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Formula to populate cells based on largest number to smallest

    Hi,

    Try the following formula in B3:

    =LOOKUP(RANK(A3,$A$3:$A$10,1)+COUNTIF($A$3:A3,A3)-1,{1,3,5,7})+1
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: Formula to populate cells based on largest number to smallest

    Thanks i should have attached the full sheet...

    I need the formulas to run down each cell in the blue column and calulate based on column D
    Attached Files Attached Files

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Formula to populate cells based on largest number to smallest

    What points will "#DIV/0! (0/0)" have? 2 or 8?

  5. #5
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: Formula to populate cells based on largest number to smallest

    It would have 8 as it's the 2nd highest figure

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Formula to populate cells based on largest number to smallest

    Hi,

    I have updated the formula in the attached file. However, this won't work when there is #DIV/0! in column "D". You need to modify the formula in column D by using IFERROR condition to set it to "0".
    Attached Files Attached Files

+ 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] Smallest/largest values based on two criteria
    By jcswaby in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2015, 06:41 AM
  2. Organize data based on Certain Values then smallest to largest
    By thelegazy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2013, 12:29 PM
  3. [SOLVED] Formula to extract top largest to smallest amount based on 3 criterias
    By aurisab in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-26-2013, 08:05 AM
  4. Excel 2007 : sort smallest number to largest
    By ravihotwok in forum Excel General
    Replies: 1
    Last Post: 12-06-2011, 11:35 AM
  5. [SOLVED] Ranking cells largest to smallest
    By jim314 in forum Excel General
    Replies: 1
    Last Post: 01-10-2005, 05:06 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