+ Reply to Thread
Results 1 to 7 of 7

Formula that works only for positive numbers

  1. #1
    Registered User
    Join Date
    03-26-2022
    Location
    Brazil
    MS-Off Ver
    16.59
    Posts
    5

    Formula that works only for positive numbers

    How can I change this formula to work only for positive numbers?

    =(SUMPRODUCT($N$5:N11,$L$5:L11)/SUMPRODUCT($M$5:M11,$L$5:L11))-1

    My goal is to calculate the percentual change of positive numbers only.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,398

    Re: Formula that works only for positive numbers

    Hi bright and welcome to the forum,

    Perhaps:
    If(((SUMPRODUCT($N$5:N11,$L$5:L11)/SUMPRODUCT($M$5:M11,$L$5:L11))-1) > 0, ((SUMPRODUCT($N$5:N11,$L$5:L11)/SUMPRODUCT($M$5:M11,$L$5:L11))-1), "")
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-26-2022
    Location
    Brazil
    MS-Off Ver
    16.59
    Posts
    5

    Re: Formula that works only for positive numbers

    Thank you, unfortunately, it does not work. Perhaps I wasn't clear hehe.

    I will share the spreadsheet so you can understand my goal.

    I want to calculate "the positive gainers of my portfolio" therefore, the stocks that the returns are positive, while not counting the stocks with negative returns.
    Attached Files Attached Files

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2504 and WPS V2024(12.1.0.18543)
    Posts
    4,109

    Re: Formula that works only for positive numbers

    Guess
    Cell E19 formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-26-2022
    Location
    Brazil
    MS-Off Ver
    16.59
    Posts
    5

    Re: Formula that works only for positive numbers

    That worked just fine!! thank you!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,398

    Re: Formula that works only for positive numbers

    Problems are always easier when an attachment with desired results is provided.

    Good Job wk9128 for getting it right!!!

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2504 and WPS V2024(12.1.0.18543)
    Posts
    4,109

    Re: Formula that works only for positive numbers

    @bright01 You're Welcome. Glad to help . Thank You for the feedback

    also thank you @MarvinP's and rep.

+ 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] Excel formula adding positive numbers only
    By sunboy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-16-2022, 10:59 AM
  2. Need Formula for Sum of only Positive Numbers and Sum of Only Negative Numbers
    By click2chaitu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2020, 09:01 PM
  3. [SOLVED] need formula to add all positive numbers in a series of numbers
    By excel4jp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-03-2017, 09:04 AM
  4. Formula for the difference between positive & negative numbers
    By buyshirts in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2016, 07:11 AM
  5. Replies: 3
    Last Post: 03-10-2016, 04:40 PM
  6. Replies: 1
    Last Post: 02-06-2013, 10:32 AM
  7. adding positive and negative numbers all as positive
    By tomvh444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2009, 04:08 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