+ Reply to Thread
Results 1 to 6 of 6

IF Function - return this value otherwise return 0

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    IF Function - return this value otherwise return 0

    Hi guys

    Pls refer to my spreadsheet attached, and look at the tab: New Test

    In cell B2, I am trying to write this formula: =IF(C2=”Yes”,0,A2) If C2 has 'Yes', return '£0.00', otherwise return the amount in A2.

    Can anyone help please?

    thank you!
    Thanks,

    R.



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

    Re: IF Function - return this value otherwise return 0

    No attachment ...

    So, what is wrong with the formula? It should work. Is C2 formatted as currency? What type of value is in A2? Also currency?
    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
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: IF Function - return this value otherwise return 0

    D'oh! sorry Ali. Attached now. Both are formatted as currency. thank you!
    Attached Files Attached Files
    Last edited by AliGW; 07-09-2019 at 04:12 AM. Reason: Please don't quote unnecessarily!

  4. #4
    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,288

    Re: IF Function - return this value otherwise return 0

    I think you've used curly quotes. You need straight quotes:

    =IF(C2="Yes",0,A2)

  5. #5
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: IF Function - return this value otherwise return 0

    as simple as that...! thank you Ali! rep added
    Last edited by AliGW; 07-09-2019 at 04:20 AM. Reason: Please don't quote unnecessarily!

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

    Re: IF Function - return this value otherwise return 0

    No problem and thanks.

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.

+ 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. [SOLVED] IF logical test pass return with 1st LOOKUP if true, if false then return with 2nd VLOOKUP
    By powerzasty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2017, 03:55 PM
  2. [SOLVED] return FROM TO values from custom defined range , and return all possible combination
    By raj soni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2016, 01:38 PM
  3. Replies: 2
    Last Post: 05-07-2015, 04:38 PM
  4. Double click row to return data to userform for edit then return back to sheet
    By MattRSJ in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-31-2014, 06:05 AM
  5. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  6. Replies: 6
    Last Post: 10-11-2012, 02:39 PM
  7. Return zero if UDF-function return error
    By mkvassh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2010, 08:56 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