+ Reply to Thread
Results 1 to 6 of 6

Multiply only when values in a row are positive

  1. #1
    Registered User
    Join Date
    07-24-2016
    Location
    Pomona, CA
    MS-Off Ver
    2010
    Posts
    3

    Multiply only when values in a row are positive

    I want to multiply the value in 2 cells in a row but only if both cells contain a positive number. If either cell or both cells contains a negative number then I want the output cell to display as 0. Can this be done?

    Thanks,
    Eric

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: Multiply only when values in a row are positive

    Do you mean something like this?

    Row\Col
    A
    B
    C
    D
    1
    Num1
    Num2
    If both > 0
    2
    4
    1
    4
    =IF(AND(A2>0,B2>0),A2*B2,0)
    3
    1
    4
    4
    4
    -2
    -3
    0
    5
    3
    -3
    0
    6
    4
    5
    20
    7
    5
    0
    0
    8
    4
    3
    12
    9
    -3
    5
    0
    10
    0
    -1
    0
    Dave

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Multiply only when values in a row are positive

    Or you may try it like this......

    Assuming the cells in the interest are A2 and B2, then try...

    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.
    Last edited by sktneer; 07-24-2016 at 11:41 PM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    07-24-2016
    Location
    Pomona, CA
    MS-Off Ver
    2010
    Posts
    3

    Re: Multiply only when values in a row are positive

    Thank you. I figured out a work around but this will be useful in the future.

    Regards,
    Eric

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Multiply only when values in a row are positive

    If your issue is resolved, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  6. #6
    Registered User
    Join Date
    07-24-2016
    Location
    Pomona, CA
    MS-Off Ver
    2010
    Posts
    3

    Re: Multiply only when values in a row are positive

    Done. Thanks again. I will be back.

+ 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. How to multiply positive or negative values only
    By combos in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2016, 05:05 AM
  2. Replies: 15
    Last Post: 09-09-2015, 08:42 PM
  3. Replies: 3
    Last Post: 10-03-2014, 12:04 AM
  4. [SOLVED] Multiply only positive number
    By doylzer in forum Excel General
    Replies: 3
    Last Post: 09-30-2014, 12:07 PM
  5. Find values position in table between two values, multiply by adjacent value
    By bradfordstl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2011, 01:14 PM
  6. Replies: 4
    Last Post: 09-26-2005, 06:05 PM
  7. [SOLVED] Multiply (C8-C4) by B10 to display positive only i.e. C8>=C4
    By seamusdoherty in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-04-2005, 12:06 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