+ Reply to Thread
Results 1 to 6 of 6

Display value in one cell based on condition in another cell; otherwise, display "0"

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    Schenectady, NY
    MS-Off Ver
    Excel 2011 Mac
    Posts
    64

    Display value in one cell based on condition in another cell; otherwise, display "0"

    Hi. I am trying to create a formula that will display, in column C, the value in column A if column B contains "xb". If column B does not contain "xb", then the formula should display "0".

    Example:

    .....A......B......C
    1...3......xb......3
    2...2...............0
    3...5......xb......5

    Thanks!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Display value in one cell based on condition in another cell; otherwise, display "0"

    Try this one

    =IF(B1="xb",A1,0)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Display value in one cell based on condition in another cell; otherwise, display "0"

    In cell C1 put this formula and pull it down.

    =IF(B1="xb",A1,0)
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Display value in one cell based on condition in another cell; otherwise, display "0"

    Here's another one...

    Entered in C1 and copied down:

    =(B1="xb")*A1
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    08-20-2013
    Location
    Schenectady, NY
    MS-Off Ver
    Excel 2011 Mac
    Posts
    64

    Re: Display value in one cell based on condition in another cell; otherwise, display "0"

    Thanks, guys!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Display value in one cell based on condition in another cell; otherwise, display "0"

    You're welcome. We appreciate the feedback!

+ 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: 6
    Last Post: 04-14-2014, 04:30 PM
  2. Display data in cell "N" times based off of multiple criteria
    By ronalgreen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2013, 10:02 AM
  3. [SOLVED] Display a range of results with "*"&A1&"*" condition
    By Sordini in forum Excel General
    Replies: 2
    Last Post: 08-08-2012, 06:23 AM
  4. Replies: 5
    Last Post: 08-02-2010, 07:25 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