+ Reply to Thread
Results 1 to 3 of 3

Help with an IF function

  1. #1
    Registered User
    Join Date
    02-17-2015
    Location
    Sussex
    MS-Off Ver
    2007
    Posts
    1

    Help with an IF function

    I can't believe I have never found this forum before!

    Anyway, wondering if someone could help with probably something very simple. Have a column in Excel 2007 which is a few thousand rows long and is populated randomly with the numbers 24, 36 & 48. I'd like to use this data in another column and produce a result depending on what is found. I'm trying this formula:

    =IF(M7=24,R7*26/29+5)*OR(M7=36,R7*38/42+5)*OR(M7=48,R7*50/53+5)

    I think I'm nearly there (or am I!) - what am I doing wrong as the 24 calc works and I get 0.00 result for the 36 & 48 calc?

    Cheers
    Mike

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Help with an IF function

    Try this (untested)
    =IF(M7=24,R7*26/29+5, if (M7=36,R7*38/42+5, if (M7=48,R7*50/53+5)))
    Last edited by Glenn Kennedy; 02-17-2015 at 07:06 AM. Reason: Smartphone, stupiduser
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: Help with an IF function

    =IF(M7=24,R7*26/29+5,IF(M7=36,R7*38/42+5,IF(M7=48,R7*50/35+5)))
    which could possibly be shortened to

    =R7*IF(M7=24,26/29,IF(M7=36,38/42,IF(M7=48,50/35)))+5

    as long as M7 will only be 24, 36 or 48
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ 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. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  2. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  3. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  4. [SOLVED] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  5. Replies: 1
    Last Post: 03-21-2012, 11:22 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