+ Reply to Thread
Results 1 to 7 of 7

function for values between

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    london
    MS-Off Ver
    Excel 365, v16.53
    Posts
    34

    function for values between

    Hello,

    I am looking for a function that will show in B2:
    when the value in A1 is below 24, it shows the value in A1
    when the value in A1 is between 24 and 48, it shows the value (A1-24)
    when the value in A1 is over 48, it shows the value (A1-48)

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,065

    Re: function for values between

    Try this:

    =IF(A1<24,A1,IF(A1>48,A1-48,A1-24))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: function for values between

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-26-2012
    Location
    london
    MS-Off Ver
    Excel 365, v16.53
    Posts
    34

    Re: function for values between

    Thank you again

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,065

    Re: function for values between

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,670

    Re: function for values between

    Not clear what you want to see if the value is exact 24 or 48 maybe this wil work :
    Please Login or Register  to view this content.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  7. #7
    Registered User
    Join Date
    01-26-2012
    Location
    london
    MS-Off Ver
    Excel 365, v16.53
    Posts
    34

    Re: function for values between

    Hello, Thank you

+ 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. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  2. Need VBA function to extract values from one column based on values enlisted
    By suhasg1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2018, 10:54 AM
  3. Replies: 1
    Last Post: 09-30-2015, 11:37 PM
  4. If function + Find Function to search for multiple values
    By HabsFan89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2015, 12:11 PM
  5. Replies: 1
    Last Post: 04-30-2014, 05:49 PM
  6. NoobQ: Rank function treats negative values as positive values. Help!
    By lutonoodles in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-12-2013, 02:10 PM
  7. switch values of a pivot data fields using cell values (function and attribute)?
    By Shmulik_r in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2013, 02:36 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