+ Reply to Thread
Results 1 to 5 of 5

How to assign text to a range of values

  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to assign text to a range of values

    Hi there, I'm new here. Is there a way to get Excel to insert a text or time to correspond to a value?

    For example, through calculations,

    =A1+B1, I get 2 (in C1) and so I need D1 to state 'Good'

    And if =A2+B2 equals 3 (in C2) then I need D2 to be 'Average'
    =A3+B3 equals 4 (in C3) then D2 will be Bad.

    Just a simple example but that is basically what I need done. And it is to be associated with those exact words Good, average and bad.

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: How to assign text to a range of values

    in D1 use

    =IF(C1=2,"Good",IF(C1=3,"Average",IF(C1=4,"Bad"))) and copy down
    or
    =IF(C1=2,"Good",IF(C1=3,"Average","Bad"))

    or
    in D1 =IF(C1=2,"Good","")
    in D2 =IF(C2=3,"Average","")
    in D3 =IF(C3=4,"Bad","")
    Last edited by Azam Ali; 08-25-2011 at 04:13 AM.
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: How to assign text to a range of values

    also in D1
    =CHOOSE(C1,"","Good","Average","Bad") and copy down

    if you define this range i.e. 2=Good, 3=Averager, 4=Bad and so on in a seperate table. then you could also use vlookup function

  4. #4
    Registered User
    Join Date
    08-25-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to assign text to a range of values

    [QUOTE=Azam Ali;2586700]in D1 use

    =IF(C1=2,"Good",IF(C1=3,"Average",IF(C1=4,"Bad"))) and copy down
    or
    =IF(C1=2,"Good",IF(C1=3,"Average","Bad"))

    Hey Azam, thanks it worked like a charm! Sorry to bother you again but does the above formula work for ranges too? eg. 20-24 and then 25-29 to get good, average and bad.

    Once again thanks, have been working at this for a long time.

  5. #5
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: How to assign text to a range of values

    result for a range could be done though nested IF+AND function or vlookup function or index+match function

+ 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