+ Reply to Thread
Results 1 to 7 of 7

If cell = certain number, output new value in next column

  1. #1
    Registered User
    Join Date
    04-04-2020
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    8

    If cell = certain number, output new value in next column

    Ok so Basically I am creating a scorecard and I am looking for a formula that will look at the value of a cell in Column D and if that value in Column D = a certain number then I want it to give a new number in Column E as a result. So if D4 = 0 then I want E4 to = 28; If D4 = 1 or 2 I want E4 to = 14, and if D4 = anything greater than 2 I want E4 to = 0.

    Is this possible? How can I do this?
    Last edited by AliGW; 05-23-2020 at 11:25 AM. Reason: Irrelevant section of title removed: this is a HELP forum!!!

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

    Re: If cell = certain number, output new value in next column

    Yes, and probably best done with a lookup table. Exactly how will require a sample workbook showing us your layout.
    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
    Registered User
    Join Date
    05-23-2020
    Location
    Guwahati, Assam, India
    MS-Off Ver
    2019
    Posts
    23

    Re: If cell = certain number, output new value in next column

    You can use this formula

    =IF(D4=0,24,IF(D4=1,14,IF(D4=2,14,"")))
    Asha Kanta Sharma
    Guwahati, India

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: If cell = certain number, output new value in next column

    Deleted
    Misread
    Last edited by Vraag en antwoord; 05-23-2020 at 11:46 AM.

  5. #5
    Registered User
    Join Date
    04-04-2020
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    8

    Re: If cell = certain number, output new value in next column

    That worked great! Thanks. I was using something similar but missed a few.

    Would this work similar if I wanted to do a range in the formula. For example IF D4 is between 0-3 then E4 = 10?

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

    Re: If cell = certain number, output new value in next column

    As I said, it would bee better with a lookup table, as it will be easier to maintain and update going forward.

  7. #7
    Registered User
    Join Date
    05-08-2020
    Location
    Lublin, Poland
    MS-Off Ver
    2003, 2007, 2010, 2019 (home); 2002, 2007, 2016, 365 (work)
    Posts
    69

    Re: If cell = certain number, output new value in next column

    Quote Originally Posted by supersoccrsqueak View Post
    That worked great! Thanks. I was using something similar but missed a few.

    Would this work similar if I wanted to do a range in the formula. For example IF D4 is between 0-3 then E4 = 10?
    Something like this
    IF(AND(D4>=0,D4<=3),10,"something else")

    But an empty cell is considered to be equal to zero in numerical comparisons, so the above formula will return 10 also for D4 being empty. If you want to exclude empty cells, try
    =IF(AND(NOT(ISBLANK(D4)),D4>=0,D4<=3),10,"something else")
    Przemyslaw Kowalik, Lublin Univ. of Technology

+ 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. Output column row when number is greater than x
    By eskilm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-01-2018, 07:34 AM
  2. Replies: 4
    Last Post: 06-02-2015, 04:35 PM
  3. Getting an output of multiple columns with averages of selected number of rows of column B
    By venkatkaushik in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2015, 09:20 AM
  4. Match multiple repeating strings in a column and output the row number
    By anilsen0711 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 09:12 AM
  5. Output value from a column only when it is a number
    By dlorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2011, 01:24 PM
  6. how to output column letter (not number) with a formula
    By luv2glyd in forum Excel General
    Replies: 3
    Last Post: 12-23-2009, 08:43 PM
  7. Replies: 7
    Last Post: 12-18-2008, 07:34 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