+ Reply to Thread
Results 1 to 9 of 9

Formula Not Showing

  1. #1
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Formula Not Showing

    HI Guys,
    I have a problem with a formula =IF(AND([@G1]=1,[@Lunch]=1),1,0)
    even though G! an Lunch is 1 it still shows me 0
    Can that have something to do with the formula what is in Lunch? Because it works just fine in Breakfast and Dinner. Every help is appreciated.
    Attached please find my sample file
    Thanks,
    Martin
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Formula Not Showing

    AND() function works like:
    AND(1,1) =1
    AND(0,1) =0
    AND(1,0) =0
    AND(0,0) =0
    maybe try OR() ?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,053

    Re: Formula Not Showing

    For AND to work, all arguments must be met, not just 1/some
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Re: Formula Not Showing

    Thanks for the infos but row 10 to 14 meeting both criteria and it still shows 0 that's why I'm confused.
    I need both criteria 1 to show a 1, Or would give me the wrong answer.

    The weird thing is if I just put a 1 manually in Lunch column it works.
    Last edited by fotodude; 11-13-2017 at 01:47 PM.

  5. #5
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Formula Not Showing

    Your lunch columns isnt numeric, its text. 1 as a number is not equal to 1 as text.

    Convert that column to numbers and it will work

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20082) 64-bit
    Posts
    31,748

    Re: Formula Not Showing

    Change H6 to


    =IF(AND([@cust]>$C$6,[@cust]<=$C$9),1,0)

    Do not put numeric in quotes as they are treated as TEXT so are comparing "1" with 1 (will not match)

    =IF(AND([@cust]>$C$6,[@cust]<=$C$9),"1","0")

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula Not Showing

    You have this in the Lunch column

    =IF(AND([@cust]>$C$6,[@cust]<=$C$9),"1","0")

    "1" is NOT the same as 1
    1 is a number
    "1" is a TEXT string

    Change that formula to
    =IF(AND([@cust]>$C$6,[@cust]<=$C$9),1,0)

  8. #8
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Re: Formula Not Showing

    Thanks everybody for the help.
    JohnTolpey and Jonmo1 suggestion to remove the "" worked.
    Thanks again
    Martin

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula Not Showing

    You're welcome.

+ 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: 8
    Last Post: 10-25-2016, 03:34 PM
  2. Cell with Formula Not Showing Date - Only Showing Serial Number
    By jbb89777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2016, 04:33 AM
  3. Excel Formula not computing; Cell showing formula text
    By John_126 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2016, 12:35 PM
  4. Replies: 2
    Last Post: 04-22-2016, 05:25 PM
  5. Replies: 1
    Last Post: 04-20-2015, 08:01 AM
  6. 2 issues: Password showing and Sheets showing even though hidden in VBA
    By jlheath01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2014, 10:24 PM
  7. [SOLVED] Multiplication in formula =*-.06 is showing too many numbers in formula bar
    By Lowerysgirl in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-19-2013, 12:23 AM

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