+ Reply to Thread
Results 1 to 6 of 6

Excel IF formula

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    wakefield
    MS-Off Ver
    Excel 2003
    Posts
    23

    Excel IF formula

    Hi folks,

    I'm really struggling with a piece of formula. I need a formula which will display either a 25, 50, 75 or 100 (these being percentages, but just need to be displayed as values) based on whether the data in A1 is equal to or less than 25% (for 25) between 25 and 50% (for 50) between 51 and 75% (for 75) 76%+ (for 100) of the figure in A2.
    Does that make sense, I'm not very proficient in excel, or in explaining myself, can anyone help with a formula to work this out?

    Thanks,

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Excel IF formula

    Hi Uksoundz, welcome to the forum.

    You can use a LOOKUP function for this, like so:

    =LOOKUP(A1,{0,.26,.51,.76},{25,50,75,100})

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    890

    Re: Excel IF formula

    Any chance of a sample sheet you are working with?
    EDIT - nevermind, Paul beat me to it

  4. #4
    Registered User
    Join Date
    03-30-2012
    Location
    wakefield
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel IF formula

    Thanks for the quick responses, how do I get this to reference the data in A2? So it looks at the data in A1 and works out the % of A2 and displays the 25,50,75,100 dependent on this.

    Thanks again !!!

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Excel IF formula

    Ah, I thought this formula was going into A2. If I'm correct, it looks like you want to determine A1 as a percentage of (divided by) A2, e.g. 27/58 is 46.5%, so you'd want to show 50.. if that's the case try adjusting the LOOKUP function from A1 to A1/A2:

    =LOOKUP(A1/A2,{0,.26,.51,.76},{25,50,75,100})

  6. #6
    Registered User
    Join Date
    03-30-2012
    Location
    wakefield
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel IF formula

    That works perfectly Paul, thanks very much for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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