+ Reply to Thread
Results 1 to 7 of 7

Goal seek to get the same value in certain cell

  1. #1
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Goal seek to get the same value in certain cell

    Hi excel experts
    in cell a1 there is a value 34156 and I put some formulas to distribute the value to certain values 200,100,50,20,10,5,1
    How to generate random numbers in column d but with a criteria to get the same value 34156 in last cell in column e in cell E11?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Goal seek to get the same value in certain cell

    Here is a possible solution. The last number cannot be random and must be calculated, all the others are function of the sum still available.

    In D5

    =RANDBETWEEN(1,INT($A$1/C5))

    In D6:D10

    =RANDBETWEEN(1,INT(($A$1-E5)/C6))

    HTH,

    Francesco
    Attached Files Attached Files
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Goal seek to get the same value in certain cell

    Great. Thanks a lot
    Is it probable to make cell d11 less than certain number (e.g cell D11 should be less than or equal 50)

  4. #4
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Goal seek to get the same value in certain cell

    File updated and slightly changed, so that we are sure to always have a least a 1 in column D for each value.

    HTH,

    Francesco
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Goal seek to get the same value in certain cell

    Thanks a lot
    In cell D10, there is 56 and 45 in the formula, what does this refer to exactly?

  6. #6
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Goal seek to get the same value in certain cell

    The first is your min value (50) plus the min sum of all remaining elements (5*1+1*1); the second is 50 decreased by the current value (5). They are needed to have in E11 a number that is always between 1 and 50 (actually, 46).

    =RANDBETWEEN(IF($A$1-E9>50+(C10+C11),INT(($A$1-SUM(C11:$C$11)-E9-(50-C10))/C10),1),INT(($A$1-SUM(C11:$C$11)-E9)/C10))

    You can change the 50 with something else, and that will be the max value for E11.

    HTH,

    Francesco

  7. #7
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Goal seek to get the same value in certain cell

    Thanks a lot for your help

+ 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] VBA to Goal Seek Multiple cell ranges
    By Masa1989 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2020, 04:41 AM
  2. Multiple Cell Goal Seek all at once
    By nomse1 in forum Excel General
    Replies: 3
    Last Post: 01-13-2016, 02:38 PM
  3. Goal seek two cells, by changing two cell
    By salah2112 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2013, 11:29 AM
  4. Replies: 3
    Last Post: 07-27-2012, 01:44 PM
  5. Goal Seek Output Cell
    By B3nnyB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2012, 02:31 PM
  6. Goal Seek Formula But Not Using Goal Seek
    By cady923 in forum Excel General
    Replies: 1
    Last Post: 08-05-2011, 03:53 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