简体   繁体   中英

Avoid circular reference when creating a "plug"

I have a Walk/Bridge between a beginning balance (BB) and an ending balance (EB): Eg

------------
BB            $100     no formula
+             $ 30     no formula
-             $(50)    no formula
Adjustment    $  x     if confirmed ending balance (CEB) = 0 then x = 0; when confirmed balance <> 0 then x = CEB - EB
EB            $ 80     Sum(of above)
------------
CEB           $ 50     no formula

When I get a confirmed ending balance I would like to "plug" the value automatically that will cause the ending balance to = the confirmed ending balance; I am stuck as this is causing me circular references.

Is there a formula that could act as a work around or an adjustment to my logic that would meet this requirement?

in the case where the CEB <> 0 the Adjustment value (x) = ($30) in which case the EB = CEB

(if possible I would like to avoid solver-addin)

The adjustment =CEB - SUM(BB, Plus, Minus)

or using your numbers =50-SUM(100,30,-50)

Then EB = SUM (BB, Plus,minus,adjustment)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM