Trying to dissect circular references...

kyddrivers

Board Regular
Joined
Mar 22, 2013
Messages
59
Office Version
  1. 365
Platform
  1. Windows
I have three large complex workbooks that do some heavy lifting. I am now getting an error when calculating: Microsoft Excel cannot calculate a formula. There is a circular reference in an open workbook, but the references that cause it cannot be listed for you. Try editing the last formula you entered or removing it with the Undo command.

When I look at error checking Circular reference is greyed out.

The lower left-hand corner says circular references: XXX, sometimes pointing to an empty cell.

I do not have enable iterative calculations checked.

Here is a simple example:

Circular reference in A258. The formula in A258 is =EOMONTH(TODAY(),9)+1. This returns 3/1/2024. This is working as expected.

Here is a complex example that I am trying to understand:

Circular reference in AB19. The formula in AB19 is: =XLOOKUP(MAX(Calls!$H$162:$H$165), Calls!$H$162:$H$165, Calls!$G$162:$G$165). This returns the date from CallsH162:165 with the max number in CallsG162:165

The formula in Calls!$H$162 is =SUM(OFFSET(INDEX($A162:$A192, MATCH(G162,$A162:$A192,1)),0,3):OFFSET(INDEX($A162:$A192, MATCH(G162,$A162:$A192,1)),7,3)).
This looks at the date in G162 and finds it in the list of days in A162:A192, moves over three columns, creates a range, and sums the range.


The Formula in G162 is =A162-DAY(A162)+8-WEEKDAY(A162-DAY(A162)). This returns 12/3/2023, the first Sunday of the month
The Formula in G163 is =G162+7. This returns 12/10/2023
The Formula in G164 is =G163+7. This returns 12/17/2023
The Formula in G165 is =G164+7. This returns 12/24/2023

The Formula in A162 is =EOMONTH(TODAY(),6)+1. This returns 12/1/2023
The formula in A163 is =IF(A162="","",IF(MONTH(A162+1)<>MONTH(A162),0, A162+1)). This returns 12/2/2023 and continues through the end of the month.

The only commonality it seems is the EOMonth function?!?

Questions, comments, ideas, suggestions?

Thanks in advance!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
xl2bb pieces to the above examples

Circular reference in A258:
CS +30 +60 day Lock Month template.xlsm
A
2583/1/2024
2593/2/2024
Calls
Cell Formulas
RangeFormula
A258A258=EOMONTH(TODAY(),9)+1
A259A259=IF(A258="","",IF(MONTH(A258+1)<>MONTH(A258),0, A258+1))


Circular reference in AB19:
CS +30 +60 day Lock Month template.xlsm
AB
19December
SL AHT Occ Shrink
Cell Formulas
RangeFormula
AB19AB19=XLOOKUP(MAX(Calls!$H$162:$H$165), Calls!$H$162:$H$165, Calls!$G$162:$G$165)


Calls tab from the AB19 mention:
Cell Formulas
RangeFormula
A162A162=EOMONTH(TODAY(),6)+1
B162:B192B162=IFERROR(XLOOKUP(A162, '\\p2pcredit.local\Fileshare\Prosper\Business Operations\IVR_Workforce\Forecast\01-Call Forecast Exports\Call Forecast Exports\[call forecast import to forecasts.xlsx]CS'!$G$2:$G$1000, '\\p2pcredit.local\Fileshare\Prosper\Business Operations\IVR_Workforce\Forecast\01-Call Forecast Exports\Call Forecast Exports\[call forecast import to forecasts.xlsx]CS'!$H$2:$H$1000), 0)
C162:C192C162=IFERROR(XLOOKUP($A162, 'Holiday factors'!$E$3:$E$29, 'Holiday factors'!$F$3:$F$29),1)
D162:D192D162=C162*B162
E162:E192E162=IF(A162<>"", WEEKDAY(A162), "")
A163:A192A163=IF(A162="","",IF(MONTH(A162+1)<>MONTH(A162),0, A162+1))
G162G162=A162-DAY(A162)+8-WEEKDAY(A162-DAY(A162))
H162H162=SUM(OFFSET(INDEX($A162:$A192, MATCH(G162,$A162:$A192,1)),0,3):OFFSET(INDEX($A162:$A192, MATCH(G162,$A162:$A192,1)),7,3))
G163:G165G163=G162+7
H163H163=SUM(OFFSET(INDEX($A162:$A192, MATCH(G163,$A162:$A192,1)),0,3):OFFSET(INDEX($A162:$A192, MATCH(G163,$A162:$A192,1)),7,3))
H164H164=SUM(OFFSET(INDEX($A162:$A192, MATCH(G164,$A162:$A192,1)),0,3):OFFSET(INDEX($A162:$A192, MATCH(G164,$A162:$A192,1)),7,3))
H165H165=SUM(OFFSET(INDEX($A162:$A192, MATCH(G165,$A162:$A192,1)),0,3):OFFSET(INDEX($A162:$A192, MATCH(G165,$A162:$A192,1)),7,3))
G168:M168G168=COUNTIFS($D$162:$D$192, ">0",$E$162:$E$192, G167)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H162:H165Cell Valuetop 1 valuestextNO


Let me know if you need any additional details.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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