+ Reply to Thread
Results 1 to 17 of 17

If statement returning 0/01/1900

  1. #1
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Unhappy If statement returning 0/01/1900

    Hi all,
    I have the following formula =IF(Main!T2<=$C$6,Main!T2,"0") If the date in a cell in the T column meets the criteria it returns that value, if it doesn't it returns 0, however if the cell is blank it returns 0/01/1900. How can I get it to just return a blank? Help please. hope this explanation makes sense.

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

    Re: If statement returning 0/01/1900

    hi there again Ronmac, maybe:
    =IFERROR(1/(1/IF(Main!T2<=$C$6,Main!T2,"")),"")

    could you list a few scenarios if i'm wrong? like:
    when C6 is 30 Aug 13 & Main!T2 is 29 Aug 13 -> what should happen?
    when C6 is 30 Aug 13 & Main!T2 is 30 Aug 13 -> what should happen?
    when C6 is 30 Aug 13 & Main!T2 is 31 Aug 13 -> what should happen?
    and so on...

    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

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: If statement returning 0/01/1900

    Try this...

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


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Also, I have the following formula =IF(Main!T2<=$C$6,Main!E2,"FALSE") If the cell in Column T is blank it is returning a positive. I need it to return a negative. Problem is along the same lines. help please.

  5. #5
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Hi Benishiryo, If C6 is 30 Aug 13 & Main!T2 is 29 Aug 13 -> should return T2
    when C6 is 30 Aug 13 & Main!T2 is 30 Aug 13 should return T2
    when C6 is 30 Aug 13 & Main!T2 is 31 Aug 13 should return 0

  6. #6
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Hi
    Sixthsense still returning 0/1/1900

  7. #7
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Thanks Benishiryo, that worked. Cheers.

  8. #8
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Thanks Benishiryo, that worked. Can you have a look at post 4 please. Cheers.

  9. #9
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Hi Benishiryo, couldn't read your message.

  10. #10
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Hi all,
    I have generated a new spreadsheet which is attached. Column H1-H10 and J1-J10 is info I have
    typed into the new spreadsheet.Column L1-10 and M 1-10 is data I have copied from my own spreadsheet.
    As you can see the formula that is working under date 1 (kindly given to me by Benishiryo) relates to the new data. As is the formula under
    User 1.
    The formula under Date 2 relates to the copied data and returns incorrect data.It returns a correct
    reading for cell 5 and an incorrect reading for cell 10.
    The formula under Date 3 appears to be working ok on the copied data.
    The formula under User 2 is relating to the copied data and is returning incorrect responses.
    Hope all of this makes sense. I am starting to get a bit confused by it all. Help please.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: If statement returning 0/01/1900

    So cell J18 also has an error but because there is something in L5 (even though it shows nothing). If you click in L5 and hit delete (even though there appears to be nothing in there) then cell J18 will also give a error result.

    So under Date 2 (i.e. cell J14) put this formula and fill down: =IF(L1="","",IF(L1<=$C$6,L1,"FALSE"))

    And under User 2 (i.e. cell N14) put this formula and fill down: =IF(L1="","",IF(L1<=$C$6,M1,"FALSE"))

    TestBook problem.xlsx

    Cheers

  12. #12
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Quote Originally Posted by Ursul View Post
    So cell J18 also has an error but because there is something in L5 (even though it shows nothing). If you click in L5 and hit delete (even though there appears to be nothing in there) then cell J18 will also give a error result.

    So under Date 2 (i.e. cell J14) put this formula and fill down: =IF(L1="","",IF(L1<=$C$6,L1,"FALSE"))

    And under User 2 (i.e. cell N14) put this formula and fill down: =IF(L1="","",IF(L1<=$C$6,M1,"FALSE"))

    Attachment 262073

    Cheers
    Hi Ursul, Thanks, I tried that and it seems to come up with a blank in the cell corresponding to L10? Cheers.

  13. #13
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: If statement returning 0/01/1900

    You're welcome

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

    Re: If statement returning 0/01/1900

    in J14, try:
    =IF(AND(L1<=$C$6,L1<>0),L1)

    in N14:
    =IF(AND(L1<=$C$6,L1<>0),M1)

    at least, i think that's what you want. ideally, you should put in "Desired Results" in say K13 & type out manually the answers you are hoping to see in K14:K24 so we can compare it with J14:J24

  15. #15
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    Thanks Benishiryo,
    That works, what do I need to change to return a blank when negative?

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

    Re: If statement returning 0/01/1900

    the IF formula has 3 parts.
    1. the logical test
    2. what to show/do when point 1 turns TRUE
    3. what to show/do when point 1 turns FALSE

    so if by saying "negative", you mean point 3 right? simply add in the 3rd point as "" to indicate blank
    =IF(AND(L1<=$C$6,L1<>0),L1,"")
    =IF(AND(L1<=$C$6,L1<>0),M1,"")

  17. #17
    Registered User
    Join Date
    08-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: If statement returning 0/01/1900

    That worked, Thanks.

+ 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. Macro for changing the date from 02-Jan-1900 to 01-Jan-1900
    By Lavanya Anandan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 07:08 AM
  2. IF Statement returning 0
    By buyshirts in forum Excel General
    Replies: 4
    Last Post: 07-16-2012, 09:03 AM
  3. Counting If statement and returning value
    By vicktown in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2010, 03:13 PM
  4. If And Statement returning #VALUE
    By AESP920 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2010, 03:22 PM
  5. if statement returning blanks
    By Mayrie in forum Excel General
    Replies: 3
    Last Post: 09-29-2009, 03:59 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