Workaround Formula to prevent Circular Reference Error

irfananeeza

Active Member
Joined
Feb 15, 2008
Messages
334
Office Version
  1. 2010
Hi,
I am looking for a formula solution.
Problem: I want to balance cell B5 with B14. I use formula =IF(B5>B14,B5-B14). I want the formula to put the resulting value within cell B13 as shown in cell B13 in red color and formula to update cell A13 value as "Due To". The total for cell BI4 should be updated to "6". =IF(B5<B14, B5-B14), then I want formula to put the resulting value in cell B4 in red color and formula to update cell A4 as "Due From". The final result should make both cells balance i.e. cell B5 = cell B14.
Issue: When I use IF formula, in any of these cells, it gives me circular reference error with a blue line. I fount it on google that I can turn off circular reference. However I do not want to do that.
Expectation: I am looking for either some kind of dynamic formula to serve my purpose or a work around to help me with balancing numbers.
I would be greatful if you can help me with the desired result.
Thanks.


Excel_BalanceSheet_Formula.png
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Have you looked at the SUBTOTAL or AGGREGATE functions instead of SUM?
Do you need to include the 4th row of the SUM columns in the first argument of the IF Function?
 
Upvote 0
Have you looked at the SUBTOTAL or AGGREGATE functions instead of SUM?
Do you need to include the 4th row of the SUM columns in the first argument of the IF Function?
SOrry, I did not get a chance to add this before the editing time expired:
Would this work:
Book1
BC
1
2Receivable 12
3Receivable 22
4Receivable 32
5Sum Receivables6
6
7
8
9Payable 11
10Payable 21
11Payable 31
12Sum Payables3
13
14DUE FROM3
Sheet1
Cell Formulas
RangeFormula
B2:B4B2="Receivable " & ROW()-1
C5,C12C5=SUM(C2:C4)
B9:B11B9="Payable " & ROW(B9)-8
B14B14=IF(C12>C5,"DUE TO",IF(C12<C5,"DUE FROM",""))
C14C14=ABS(IF(C12>C5,C5-C12,IF(C12<C5,C12-C5,0)))
 
Upvote 0
Would this work:
I don't think so, at least as I understand what the OP is trying to do. Try changing cell C10 to say 12.

@irfananeeza
Your cell references are very hard to follow. I suggest that you investigate XL2BB for providing sample data & expected results to make it easier for helpers to understand just what you have & where it is and also what you want & where it is to be. It also makes it easy for us to copy your sample for testing.

See if something like this does what you want.

24 01 31.xlsm
B
1
22
32
42
5 
66
7
81
91
101
113
126
13
Balance
Cell Formulas
RangeFormula
B5B5=IF(SUM(B2:B4)>SUM(B8:B10),"",SUM(B8:B10)-SUM(B2:B4))
B6,B12B6=SUM(B2:B5)
B11B11=IF(SUM(B8:B10)>SUM(B2:B4),"",SUM(B2:B4)-SUM(B8:B10))


24 01 31.xlsm
B
1
22
32
42
56
612
7
81
910
101
11 
1212
13
Balance
Cell Formulas
RangeFormula
B5B5=IF(SUM(B2:B4)>SUM(B8:B10),"",SUM(B8:B10)-SUM(B2:B4))
B6,B12B6=SUM(B2:B5)
B11B11=IF(SUM(B8:B10)>SUM(B2:B4),"",SUM(B2:B4)-SUM(B8:B10))
 
Upvote 0
Here is another try at it:

Book1
BC
2Receivable 13
3Receivable 23
4Receivable 33
5DUE TO3
6Total Receivables12
7
8
9Payable 14
10Payable 24
11Payable 34
12  
13Total Payables12
Sheet1
Cell Formulas
RangeFormula
B5B5=IF(SUM(C9:C11)>SUM(C2:C4),"DUE TO","")
C5C5=IF(SUM(C9:C11)>(SUM(C2:C4)),ABS((SUM(C2:C4))-SUM(C9:C11)),"")
C6,C13C6=SUM(C2:C5)
B12B12=IF(SUM(C9:C11)<SUM(C2:C4),"DUE FROM","")
C12C12=IF(SUM(C9:C11)<SUM(C2:C4),ABS(SUM(C9:C11)-SUM(C2:C4)),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B5:C5Expression=$C5>0textNO
B12:C12Expression=$C12>0textNO
 
Last edited:
Upvote 0
If you tweak the inequality signs &/or the subtraction order you can drop the ABS function.
.. but then it would look very familiar to me. :biggrin:
Sorry @Peter_SSs , the web page didn't show your comments until I went away from the page and came back. I need to remember to press F5 to refresh the entire page
 
Upvote 0
Thanks to both [B]awoohaw[/B] and [B]Peter_SSs[/B]. The Due To/From formula helped. However, the SUM formula does not help the way I want to balance. Maybe its the way I presented the problem that confused you. I am reviewing the guidelines for xl2BB right now so I can repost the exact problem. So, you have a better idea of the issue and the solution.
 
Upvote 0
Hi Team, I am reposting my data. I need a dynamic formula that determines the balancing number and put it into the correct yellow cell. This will balance the totals in grey i.e. B8 = B23. For e.g., value in cell B30 and B31 provides me the balancing number and I have to input it manually. My objective is not to input manually instead it gets done automatically. Thanks for your help in advance.
Formula_to_Balance_BalanceSheet.xlsx
ABC
1Assetsin 2023
2BS - RBC Busines Cheking137,781Value is coming from other sheet
3BS - Prepaid Expense0Value is coming from other sheet
4BS - Deposit Paid by You0Value is coming from other sheet
5
6Description appears when appliesField should auto populate based on formula results
7
8Total Assets37,781
9
10Liabilities
11BS - Master Card0Value is coming from other sheet
12BS - Customer Deposits Received0Value is coming from other sheet
13BS - Loan Payable0Value is coming from other sheet
14
15BS - Due to ShareholderField should auto populate based on formula results
16
17Total Liabilities0
18
19Shareholder Equity
20Retained Earnings Closing Balance-7,482from cell B28
21
22Total Shareholder Equity-7,482Sum Formula
23Total Liabilities & Shareholder Equity-7,482Sum Cell B15 + Cell B22
24
25Retained Earnings
26Opening RE-15,637
27Net Income (Loss)8,155
28Closing Balance-7,482
29
30Due from shareholderFALSEManually Input Value in Yellow cell B6
31Due to shareholder45,263Manually Input Value in Yellow cell B15
Sheet1
Cell Formulas
RangeFormula
B1B1="in"&" "&YEAR('https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Instructions'!$B$7)
A2A2='https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Trial Balance'!B2
A3:A4A3=+'https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Trial Balance'!B11
A6A6=IF(SUM(B2:B4)<SUM(B11:B13),"BS - Due from Shareholder","Description appears when applies")
B8,B17B8=SUM(B2:B6)
A12A12=+'https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Trial Balance'!B16
A13A13=+'https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Trial Balance'!B18
A15A15=IF(SUM(B2:B4)>SUM(B11:B12),"BS - Due to Shareholder","Description appears when applies")
B20B20=+B28
B22B22=+SUM(B20:B20)
B23B23=+B17+B22
A27A27=+'https://d.docs.live.net/23da963b31d0f08e/Desktop/Tools ^0 Training/Tools ^0 Training/Bookkeping Templates for Silver Fox/[Corporate Bookkeeping Template_v3 - Copy - Copy.xlsx]Income Statement'!A31
B28B28=+SUM(B26:B27)
B30B30=+IF(B8<B23,-B23)
B31B31=+IF(B8>B23,B8-B23)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top