+ Reply to Thread
Results 1 to 6 of 6

Return text based on certain values and between values.

  1. #1
    Forum Contributor
    Join Date
    04-06-2017
    Location
    Wolverhampton
    MS-Off Ver
    Office 365
    Posts
    471

    Return text based on certain values and between values.

    Hello All
    (Please see attached)

    In A6
    If I enter any the values in row 1… it will return the text in row 2

    Paul
    Attached Files Attached Files

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

    Re: Return text based on certain values and between values.

    Like this:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    1
    0
    5
    6
    10
    12
    2
    6 - 2
    6 - 2 + Sat
    6 - 2 + 2 - 10
    6-2 + 2-10 + Sat
    3 Shifts
    3
    4
    5
    6
    10.5
    7
    6-2 + 2-10 + Sat
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    A
    7
    =HLOOKUP(A6,$A$1:$F$2,2,1)
    Sheet: Sheet1
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    04-06-2017
    Location
    Wolverhampton
    MS-Off Ver
    Office 365
    Posts
    471

    Re: Return text based on certain values and between values.

    The values on row 1 are variable…

    Return 6-2 = 5 or below
    Return 6-2+sat = between 5 – 6
    Return 6-2 + 2-10 + Sat = greater than 10 but below 11


    I’ve managed to do this… I just don’t know I apply the other rules
    =IF(A6<=5,"6-2")

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Return text based on certain values and between values.

    try
    =LOOKUP(A6,{0,5.00001,6.00001,10.00001,11.00001},{"6 - 2","6 - 2 + Sat","6 - 2 + 2 - 10","6-2 + 2-10 + Sat","3 Shifts"})
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Contributor
    Join Date
    04-06-2017
    Location
    Wolverhampton
    MS-Off Ver
    Office 365
    Posts
    471

    Re: Return text based on certain values and between values.

    thats great, works well

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Return text based on certain values and between values.

    Why not just change the values on row 1 as I demonstrated and use the HLOOKUP method???

+ 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. Stuck on a IF function and text return based on values
    By Cedric Wyckmans in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2017, 07:06 AM
  2. Filter Based on Text in Cell, Return Values on Same Sheet
    By potatoman54 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2016, 02:16 PM
  3. [SOLVED] VBA code to look up a list of values based on entered values and return all values.
    By dnwadams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2015, 10:14 PM
  4. Replies: 3
    Last Post: 12-03-2014, 05:43 PM
  5. [SOLVED] Return array of values based on text
    By djm601 in forum Excel General
    Replies: 4
    Last Post: 11-19-2012, 11:09 AM
  6. Replies: 6
    Last Post: 01-22-2012, 12:39 PM
  7. VLOOKUP to return values based on partial text
    By cartlidge_adrian in forum Excel General
    Replies: 5
    Last Post: 01-13-2012, 05:20 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