+ Reply to Thread
Results 1 to 8 of 8

displaying a product generated from one of two input-methods, cost per length, or per unit

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Jeddah
    MS-Off Ver
    Excel 2010
    Posts
    5

    displaying a product generated from one of two input-methods, cost per length, or per unit

    Someone might generate one of two 'products/multiplications' - price depending on unit or, length - the data for which are collected under separate columns (a1,b1 or c1d1) and I would then like to display the product of either, in a single column - I'm thinking, there's a rule/precedence, if there's an answer in one, the answer is in red, if the product comes from the second column, the answer is in green - is conditional formatting ; but how do ask a cell to choose between boxes, based on two blank cells out of four.. messy to just ignore zeroes.

    Is there a better way?

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    Hi
    question is not clear, please post an example.

  3. #3
    Registered User
    Join Date
    06-19-2013
    Location
    Jeddah
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    I'll do a graphic, cheers
    excel product-select.JPG

    maybe

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    In E1 enter:

    =IF(AND(A1=0,B1=0),C1*D1,A1*B1)
    Gary's Student

  5. #5
    Registered User
    Join Date
    06-19-2013
    Location
    Jeddah
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    Huh, two things, I thought IF,AND returned true,false ...and secondly, apparently, there are too many arguments - take out the AND (guessing)
    -= alright, it now works,.. and returns 'FALSE'
    Last edited by ZBK; 06-19-2013 at 09:07 AM.

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    My thinking was:

    If both A1 and B1 are zero, use the second pair.
    If there are any non-zero values in either A1 or B1, use the first pair.

  7. #7
    Registered User
    Join Date
    06-19-2013
    Location
    Jeddah
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    It seems to want to '*' the condition -- =IF(AND(E17=0,F17=0),H17*I17,E17*F17)

    I was missing the comma after the brackets : works very happily

    exactly as you surmised,

    gosh

  8. #8
    Registered User
    Join Date
    06-19-2013
    Location
    Jeddah
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: displaying a product generated from one of two input-methods, cost per length, or per

    Alright, it's making sense. Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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