+ Reply to Thread
Results 1 to 5 of 5

Recursively Update Cell Values to Make Sum of Range Match Given Number

  1. #1
    Registered User
    Join Date
    07-22-2019
    Location
    Goergia
    MS-Off Ver
    10
    Posts
    2

    Unhappy Recursively Update Cell Values to Make Sum of Range Match Given Number

    Hello dear members

    My problem is that i want to solve this task, well, let's assume i have numbers in the row

    10 - cell B2
    15 - cell B3
    20 - cell B4
    50 - cell B5
    55 - cell B6

    H5 is some random cell, where written some random valve.
    now i want to write a function: IF Range B2:B6 greater/equal/less than H5, then B2:B6-H5/720, and let's assume that the result is 2, then plus 2 to

    cell B2 +2
    cell B3 +2
    cell B4 +2
    cell B5 +2
    cell B6 +2

    thank you in advance.
    Last edited by AliGW; 07-23-2019 at 02:57 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,912

    Re: How to do this??? HELP

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

    I would normally improve the title for a newcomer, however I am afraid I have no clue what you are trying to do - sorry.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to do this??? HELP

    Agree with Ali that is is hard to make out what you want here?

    Are you saying that you have a set of values in the range B2:B6, the sum of those values gets compared to another value in H5. If that total is "greater/equal/less" H5...and that part males NO sense, as the answer will ALWAYS be greater/equal/less...then adjust the values in B2:B6 by a certain factor?

    If that is indeed what you are trying to do, you wont be able to do that with a formula (not without creating a circ ref error), you would need VBA for that.

    However, I think you need to walk us through what you are trying to do here, so we can understand exactly what you are trying to do.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-22-2019
    Location
    Goergia
    MS-Off Ver
    10
    Posts
    2

    Re: How to do this??? HELP

    Dear members thanks for your response

    i will try to simplify the question

    10 - cell B2
    15 - cell B3
    20 - cell B4
    50 - cell B5
    55 - cell B6

    how to write function: IF sum of Range B2:B6 greater H5, then (B2:B6)-H5=result

    after all i want to add the result to this cell, like

    10 - cell B2 + result
    15 - cell B3 + result
    20 - cell B4 + result
    50 - cell B5 + result
    55 - cell B6 + result

    well to better understand what my question is for instance IF sum of Range B2:B6 greater H5, then (B2:B6)-H5=2 <-- (i want to calculate this numbers, now it just i random number)
    in the cell will be
    12 - cell B2
    17 - cell B3
    22 - cell B4
    52 - cell B5
    57 - cell B6

    as you can see they raised with two
    Last edited by Nodar; 07-23-2019 at 01:58 AM.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,912

    Re: How to do this??? HELP

    This cannot be done without VBA.

    I am going to attempt to update your title (in future you MUST provide descriptive thread titles yourself) and move this to the VBA section.

+ 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] Recursively Indent Cell Text based on Another Cell
    By dchanson in forum Excel General
    Replies: 3
    Last Post: 05-03-2019, 10:11 AM
  2. [SOLVED] link cell sum to YTD number without having to update sum range
    By Shruder in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2018, 04:01 PM
  3. Find and update multiple sheet tabs with new data based on range of cell values.
    By robcgp1200 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-20-2017, 04:59 PM
  4. Match cell values and update another workbook
    By johnny_p in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2013, 07:14 AM
  5. Match cell on external workbook and update a row of values, otherwise add whole row..
    By Bergmania in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2012, 05:14 PM
  6. [SOLVED] compare cell value with range of values and match row values with header
    By bujji1305 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2012, 12:19 AM
  7. Recursively traverse through a range and assign a value to each cell in range
    By itzchau in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-11-2010, 12:44 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