+ Reply to Thread
Results 1 to 14 of 14

Formula to show specific values

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    infirmities fareappl
    MS-Off Ver
    Excel 2007
    Posts
    5

    Formula to show specific values

    Hello -

    What would be a good formula to use to return specific values depending on the number in the adjacent cell?

    I have a set of numbers in column B if I have 63 in B2, I would like a formula to return 61-90. If it's 28, then 1-30.

    Value 1 Value 2
    63
    63
    63
    63
    28
    28
    28
    28
    28
    28
    28
    28

    Thank you!
    Last edited by yssong14; 10-22-2013 at 10:27 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula to show specific values

    Can you explain your logic in what you want to return?

    Pete

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,023

    Re: Formula to show specific values

    =if(B1=63,"61-90",if(B1=28,"1-30","")) might be what you are looking for.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    06-11-2013
    Location
    infirmities fareappl
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula to show specific values

    Quote Originally Posted by Pete_UK View Post
    Can you explain your logic in what you want to return?

    Pete
    Sorry. Could you explain what that means?

  5. #5
    Registered User
    Join Date
    10-22-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Formula to show specific values

    Try
    Please Login or Register  to view this content.
    and copy it down column C

  6. #6
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to show specific values

    Assuming your data is in A1 and downward, use this in B1 and fill down... How about something like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    -Moo

    Formula edited... was inconsistent on exact numbers (30,60,90)
    Last edited by Moo the Dog; 10-22-2013 at 10:09 AM.

  7. #7
    Registered User
    Join Date
    06-11-2013
    Location
    infirmities fareappl
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula to show specific values

    Quote Originally Posted by alansidman View Post
    =if(B1=63,"61-90",if(B1=28,"1-30","")) might be what you are looking for.
    What if there's a whole range of values? so pretty much any number in column B that is between 61-90, I want to show "61-90" in column C, and any number between 1-30 I would like to show "1-30", and any number between 31-60, I want to show "31-60".

    i apologize for not being more specific.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,023

    Re: Formula to show specific values

    Look at the Moo the Dog's response. I lost my crystal ball last week and didn't realize that there was more to your question than expressed.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to show specific values

    Perhaps:

    =LOOKUP(A2,INDEX(30*(ROW($1:$100)-1)+1,,))&" - "&LOOKUP(A2+30,INDEX(30*ROW($1:$100),,))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  10. #10
    Registered User
    Join Date
    10-22-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Formula to show specific values

    Quote Originally Posted by yssong14 View Post
    What if there's a whole range of values? so pretty much any number in column B that is between 61-90, I want to show "61-90" in column C, and any number between 1-30 I would like to show "1-30", and any number between 31-60, I want to show "31-60".
    The formula I posted above should do this Yssong.

  11. #11
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to show specific values

    That's alright Alan... the last time I used my crystal ball was to hit a 7-10 split. The rest, as they say, is history. =)

    - Moo

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula to show specific values

    Another crystal ball question !!

    Hello, Moo, I've not seen you posting for a while.

    Pete

  13. #13
    Registered User
    Join Date
    06-11-2013
    Location
    infirmities fareappl
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula to show specific values

    Quote Originally Posted by FinlayH View Post
    Try
    Please Login or Register  to view this content.
    and copy it down column C
    This worked! Thank you all so much!

  14. #14
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to show specific values

    Pete,

    Hello to you as well! Yes, my time committed to helping out around here has been quite limited for much of the year - job demands, family, etc.

    It seems you guys have been handling things pretty well without me here, but I am glad to help out when I can.

    - Moo

+ 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: 4
    Last Post: 12-14-2012, 09:35 PM
  2. Replies: 2
    Last Post: 02-06-2012, 05:04 PM
  3. Find and show sum of values that equal a specific number
    By nplouffe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2011, 12:07 PM
  4. Formula to Show Accounting Month based on a specific date range
    By michelle saluta in forum Excel General
    Replies: 1
    Last Post: 09-23-2010, 02:17 PM
  5. [SOLVED] Formula to show the specific result
    By PRADEEPB270 in forum Excel General
    Replies: 4
    Last Post: 03-17-2010, 07:24 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