+ Reply to Thread
Results 1 to 8 of 8

Logical check working some of the time

  1. #1
    Registered User
    Join Date
    07-08-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    4

    Logical check working some of the time

    Hello everyone! Please see attached image. I created this formula last night to basically create a bill of materials for my order list (circled in blue). It's saying if the column H values are equal to the column D values and if the column E values are equal to 0.75 (it's coincidence that they are all the same), then sum the quantity of that size.

    So here, I have 1 that is 5.5x.75, 2 that are 5.75x.75, and 1 that is 6.25x.75. My question is why isn't my formula working for the ladder size? It works for the first 2 but not the 6.25. I'd appreciate any kind of help!!

    Thank you
    Scott

    Logic question.JPG
    Last edited by scarpbot; 07-08-2016 at 11:32 AM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Logical check working some of the time

    No ladder size in your image

    D4 is not equal to H4, so result is correct. Same for D5 and E5.

    In principle, the first 2 are wrong, because only some of the criteria in the AND function are met. All 4 rows should return -1. The correct result in the first 2 rows is coincidence.

    Please attach a sample workbook, not image. Type in the expected results and explain to us how you got those results.

  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
    52,933

    Re: Logical check working some of the time

    Not really sure why you are even using SUM, when you want a value for that row only?

    Perhaps this will simplify it though...
    =sumifS(F$2:F$5,D$2:D$5,H2.E$2:E$5,H$1)

    AND wont work like that with a range, you need to compare 1 cell with 1 cell
    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
    Registered User
    Join Date
    07-08-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    4

    Re: Logical check working some of the time

    My apologizes. This is my first time posting to the forum. I've attached the file that I'm using

    Ruck Plate Recipe.xlsx
    Last edited by scarpbot; 07-08-2016 at 11:33 AM.

  5. #5
    Registered User
    Join Date
    07-08-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    4

    Re: Logical check working some of the time

    Quote Originally Posted by FDibbins View Post
    Not really sure why you are even using SUM, when you want a value for that row only?

    Perhaps this will simplify it though...
    =sumifS(F$2:F$5,D$2:D$5,H2.E$2:E$5,H$1)

    AND wont work like that with a range, you need to compare 1 cell with 1 cell
    This is exactly what I was trying to do. That solved my problem. Thank you so much for helping me out!!

  6. #6
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Logical check working some of the time

    =IF(COUNTIFS(H2,D2,E2,0.75)>0,SUM(D2*F2),0)

    I think that's what you want, put this is I2 and run the formula down to I5 and it will work for each line
    Last edited by Sc0tt1e; 07-08-2016 at 11:38 AM.

  7. #7
    Registered User
    Join Date
    07-08-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    4

    Re: Logical check working some of the time

    Quote Originally Posted by Sc0tt1e View Post
    =IF(COUNTIFS(H2,D2,E2,0.75)>0,SUM(D2*F2),0)

    I think that's what you want, put this is I2 and run the formula down to I5 and it will work for each line
    Not quite what I'm looking for but still an interesting way of doing it!
    The formula you supplied gives me the quantity x size. So if I have two 5.5, it will output 11.
    Thanks again for the reply!!

  8. #8
    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
    52,933

    Re: Logical check working some of the time

    Happy to help

+ 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] VBA UserForm.Value Check If User Form Buttons checked Not Working. Check Button on Open.
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-11-2016, 05:55 PM
  2. Time Calculation using Logical function
    By L Raju in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2014, 04:00 AM
  3. [SOLVED] Accounting logical test to cross check columns and rows, not allowing pence
    By RoyLittle0 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2014, 01:07 PM
  4. logical and time calculation problem
    By wba in forum Excel General
    Replies: 4
    Last Post: 07-01-2012, 07:05 AM
  5. IF Logical Test for Time Range In Cell
    By Bob McCusker in forum Excel General
    Replies: 8
    Last Post: 07-23-2010, 04:58 AM
  6. logical test not working
    By arora in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-04-2008, 05:08 AM
  7. IF and many logical tests at same time
    By saurya_s in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-21-2007, 10:45 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