+ Reply to Thread
Results 1 to 5 of 5

How to create a IF cell contains Yes, add Moderate to another cell.

  1. #1
    Registered User
    Join Date
    01-02-2021
    Location
    Doha, Qatar
    MS-Off Ver
    Office 365
    Posts
    2

    How to create a IF cell contains Yes, add Moderate to another cell.

    I am a medical student (so not very tech savvy) and currently doing a research on COVID-19 severity

    I have data of over 100,000 patients. In the data I have, a column G is named Symptomatic which contains values "Yes" or "No" or "Unknown"

    I have created another column F that says Severity, I want the column to automatically contain "Mild" if column G says No and automatically contain "Moderate" if column G says Yes.

    The columns are shown in the picture. I did these manually to give an idea of what I want.
    Untitled.jpg

    I wanted to know if there can be a formula that can automatically do this for me since its data of 100,000 patients and I will keep receiving more.

  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,726

    Re: How to create a IF cell contains Yes, add Moderate to another cell.

    Try this in F2:

    IF(G2=No","Mild",IF(G2="Yes","Moderate","Other"))

    then copy it down by double-clicking the Fill Handle (the small black square in the bottom right corner of the cursor), with F2 selected.

    Note that the Other comment covers situations where column G cells do not contain Yes or No.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: How to create a IF cell contains Yes, add Moderate to another cell.

    Hi
    Try this in C2 and down:
    =IF(D2="YES","MODERATE","MILD")
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-02-2021
    Location
    Doha, Qatar
    MS-Off Ver
    Office 365
    Posts
    2

    Re: How to create a IF cell contains Yes, add Moderate to another cell.

    Brilliant! thank you so much.

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

    Re: How to create a IF cell contains Yes, add Moderate to another cell.

    Glad to help.

    I see that you have joined the forum today, so there are a couple of "admin" type tasks you should undertake to wrap things up on this thread:

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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: 3
    Last Post: 11-02-2018, 03:05 PM
  2. Replies: 7
    Last Post: 08-20-2014, 11:22 PM
  3. [SOLVED] Moderate working code to be shorter
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2014, 06:10 AM
  4. [SOLVED] How to create/run "cell A equals Cell B put Cell C info in Cell D
    By abmb161 in forum Excel General
    Replies: 7
    Last Post: 02-05-2014, 02:20 AM
  5. [SOLVED] Help to moderate code shorter
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-14-2013, 02:08 PM
  6. Replies: 17
    Last Post: 08-17-2006, 08:32 AM

Tags for this Thread

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