+ Reply to Thread
Results 1 to 6 of 6

Need help with logic statement

  1. #1
    Registered User
    Join Date
    08-25-2014
    Location
    Louisiana
    MS-Off Ver
    2014
    Posts
    17

    Need help with logic statement

    Okay, this will probably be the most horrible explanation ever of a problem but here goes...

    I have written a program which calculates weld times for job quoting. It works well when I use whole or half numbers for my weld thickness (1 or 0.5, 2 or 2.5).

    The problem exists when I enter a number such as 0.9 in my thickness (G13). When I do this it gives me a Zero (0) value near the bottom J51:J90. It does this because of my logic statement (=IF(A51=$K$13,H51,0)) When I enter the odd number in the G13 (such as 0.9) it will output a zero because it does not match the precedent.

    Can someone take a look at this for me and see where I went wrong? Is there an easier way to do this?

    https://onedrive.live.com/redir?resi...nt=file%2cxlsx

    I have attached a link and an attachment. They should be the same file.
    Attached Files Attached Files

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Need help with logic statement

    in K13 put this formula

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Need help with logic statement

    I'm not 100% on what you're doing here, so I might have the logic wrong, but I think you can just do this instead:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Need help with logic statement

    In K13, change to the following:

    =roundup(G13/F13,0)

    This creates a whole number that will work on your list.

    Hope that helps.

    -Z

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need help with logic statement

    Okay, do you want K13 to round up, round or round down ?
    Whichever you choose, fix the formula in that cell, such as

    =ROUNDUP(G13/F13,0)
    or
    =ROUND(G13/F13,0)
    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    08-25-2014
    Location
    Louisiana
    MS-Off Ver
    2014
    Posts
    17

    Re: Need help with logic statement

    OMG I LOVE YOU. This forum is amazing. Thank you, everyone, for taking a look at my problem.

    Quote Originally Posted by Zodeeak View Post
    In K13, change to the following:

    =roundup(G13/F13,0)

    This creates a whole number that will work on your list.

    Hope that helps.

    -Z

+ 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. IF statement Logic..
    By inincubus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2014, 05:27 PM
  2. Logic Statement
    By jeanmuhree in forum Excel General
    Replies: 5
    Last Post: 02-20-2012, 03:10 AM
  3. Excel 2007 : If statement - logic syntax
    By Omegaman in forum Excel General
    Replies: 5
    Last Post: 04-27-2009, 12:25 AM
  4. Logic Statement
    By abierly in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2006, 02:15 PM
  5. [SOLVED] Using 'AND' logic in a SUMIF statement
    By IpcTrain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-10-2006, 01:45 PM

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