+ Reply to Thread
Results 1 to 2 of 2

Problem using solver with COUNTIF function

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    ldn, uk
    MS-Off Ver
    excel 2007
    Posts
    1

    Problem using solver with COUNTIF function

    Hi all,

    I have a sheet (attached) with returns for 5 investments, a sumproduct of the weights I hold these investments in, and a column with returns for the benchmark for my investments.

    What I want to do is maximise the frequency of outperformance of my investments by changing the weights while only investing in a specific number of funds. I've tried to use the solver using the constraints:

    sum of weights<=1, number of funds<=3
    and trying to maximise the number of days of outperformance using MAX.

    I think there's a problem using the COUNTIF within the solver but I haven't been able to find out how to do it myself so i throw myself at the mercy of the forum and hopefully one of you has an idea for me!

    Thanks a lot everyone.
    Attached Files Attached Files

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Problem using solver with COUNTIF function

    Yes there's a problem using IF, COUNTIF, COUNTA and other discontinus functions as Solver cannot cope with this kind of functions because the underlying math
    in Solver (Newton-Raphson, etc) cannot handle it.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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