+ Reply to Thread
Results 1 to 17 of 17

If a cell contains specific text then another cell brings specific number

  1. #1
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Lightbulb If a cell contains specific text then another cell brings specific number

    If the first cell A1 is "Cold weather" then second cell B1 shows "1" and if A1 is "Warm weather" then B1 is "2" or if A1 is "Hot weather" then B1 is "3".

    Please assist!

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: If a cell contains specific text then another cell brings specific number

    Try


    B1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by shukla.ankur281190; 11-01-2017 at 05:03 AM.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If a cell contains specific text then another cell brings specific number

    welcome to the forum. maybe:
    =MATCH(A1,{"Cold Weather","Warm weather","Hot weather"},0)

    if you have a lot more, do consider doing VLOOKUP. have a list in column G and the numbers in column H. then:
    =VLOOKUP(A1,G:H,2,0)
    i developed a tool to help people learn VLOOKUP. try downloading this file here:
    https://www.excelforum.com/tips-and-...-how-tool.html

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: If a cell contains specific text then another cell brings specific number

    Try this in B1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If a cell contains specific text then another cell brings specific number

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  6. #6
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Re: If a cell contains specific text then another cell brings specific number

    Still no luck

  7. #7
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If a cell contains specific text then another cell brings specific number

    What with all these solutions
    Perhaps you are not using Excel
    Do you have " " around the value in A1?
    If you do, remove the quote marks


    See it working in attached file
    - select value from dropdown in A1
    Attached Files Attached Files
    Last edited by kev_; 11-01-2017 at 05:11 AM.

  8. #8
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Re: If a cell contains specific text then another cell brings specific number

    I get the same error for all the solutions.
    Error 1.png

  9. #9
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If a cell contains specific text then another cell brings specific number

    Did you look at the attached workbook in post#7

  10. #10
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: If a cell contains specific text then another cell brings specific number

    Try

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change "," to ";"

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

    Re: If a cell contains specific text then another cell brings specific number

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.


    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  12. #12
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Re: If a cell contains specific text then another cell brings specific number

    Hurray
    Thanks a million, it works!

  13. #13
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If a cell contains specific text then another cell brings specific number

    Where are you based?
    Some country versions require , in-between values
    other versions require ;

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

    Re: If a cell contains specific text then another cell brings specific number

    JHB = Johannesburg,... probably. the OP's profile is NOT particularly helpful as it is not obvious where (s)he is located.

  15. #15
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If a cell contains specific text then another cell brings specific number

    NOw you have your answer - please mark thread as SOLVED
    Go to thread tools at top of thread

  16. #16
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Re: If a cell contains specific text then another cell brings specific number

    This one works too.. Thanks so much!

  17. #17
    Registered User
    Join Date
    11-01-2017
    Location
    JHB
    MS-Off Ver
    2016
    Posts
    13

    Re: If a cell contains specific text then another cell brings specific number

    I am in Johannesburg South Africa. Yes I have chaged "," to ";"
    Thanks to @shukla.ankur281190

+ 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. Displaying a Number if a specific cell contains specific text
    By Connor.pa in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-07-2017, 08:16 AM
  2. [SOLVED] if cell contain a specific text then add specific number if not add another number
    By Fielt21 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-17-2016, 04:28 AM
  3. [SOLVED] Remove duplicate from rows from specific cell/row number to specific cell/row number
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2016, 10:38 PM
  4. Replies: 3
    Last Post: 04-30-2015, 08:00 AM
  5. Replies: 3
    Last Post: 07-12-2013, 09:17 AM
  6. Replies: 1
    Last Post: 06-22-2012, 02:18 PM
  7. Replies: 3
    Last Post: 01-21-2009, 05:37 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