INDIRECT returns #VALUE! error

amdis

New Member
Joined
May 21, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi all,

So this is a problem I'm having with a 20+ tab model that I built out last year. The model works in a way that it needs to be able to expand and I've set it up so that you can just copy a tab, change the name and some details and it automatically pulls the relevant data from the previous tab. The problem I'm having now is that while this works fine on my PC, two of my analysts are having issues where whenever they open the file they're just bombarded with #VALUE errors. I've isolated the incident to this formula as the second I copy/pasted the cell contents as values when working on their PC the errors resolved themselves.

Here's the formula in question, it is dragged down and spans about 200+ rows:

Excel Formula:
=+IF(OR(INDIRECT(""&TEXT(EOMONTH($G$97, -1), "MMM")&"!E"&ROW(E107)&":F"&ROW(F107))=""),INDIRECT(""&TEXT(EOMONTH($G$97, -1), "MMM")&"!B"&ROW(E107)),"Empty")

I built this a while ago and now I can't even remember why I used that OR function but removing it doesn't seem to fix anything. Any ideas?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The formula shouldn't behave any differently on different machines. To get a #Value result you would have to put a text value into G97.
 
Upvote 0
Yea I've checked and G97 definitely isn't a text value, it's an actual date. This thing is baffling, I've opened the file on my old personal laptop and am seeing the #value errors there too. Like I said in the original post, the second I remove the indirect formula and just hard code the errors resolve so it's definitely that formula.
 
Upvote 0
When you built the formula were you already on MS 365 ?
Is there any chance it works on MS365 machines and fails on those using earlier versions ?
 
Upvote 0
Sorry about the slow replies, been a bit of a busy weekend. Thanks for your persistence in helping me. As for your first question, I used the wrong words. It's not so much a hard coded formula but it's just me hard coding the values. That's how I figured out it was the INDIRECT() formula that was the issue.

When you built the formula were you already on MS 365 ?

Yes, my analysts are on Office 2016 as we wait to get them onto a new laptop but I figured this is an issue I need to fix anyway as our auditors also use Office 2016 and haven't migrated to 365 yet. What I've found in my last few days of poking around is the formula works fine on my end but when I open it on my old personal laptop that is running Office 2016 the formulas all show up as CSE array formulas for some reason. If I press F2 and then enter to make them a normal formula instead of an array, the #VALUE error resolves itself. I'm guessing INDIRECT has issues accepting an array result and that's causing the problem here.

Not quite sure how to fix this moving forward.
 
Upvote 0
I'm guessing INDIRECT has issues accepting an array result and that's causing the problem here.
I don't have an old version of Excel to determine whether INDEX is actually causing the issue or if its pre-MS365 problem.
When you replaced indirect in your formula and did you include the E107:F107 in the OR expression and did it work on the 2016 Excel ?

Try this to see if it does the same thing and works on all machines, I got rid of relying on an Array inside the OR and made it an explicit OR expression.
Excel Formula:
=IF(OR(INDIRECT(""&TEXT(EOMONTH($G$97, -1), "MMM")&"!E"&ROW(E107))="",INDIRECT(""&TEXT(EOMONTH($G$97, -1), "MMM")&"!F"&ROW(F107))=""),INDIRECT(""&TEXT(EOMONTH($G$97, -1), "MMM")&"!B"&ROW(E107)),"Empty")
 
Upvote 0
Just tried your solution, same thing as the other. Both versions of the formula "work," so to speak. The issue continues to be that Excel keeps taking my version of the formula and turning it into a CSE array formula when opened on older machines. I saw some online conversations about prepending "@" to the formulas to avoid this happening but that doesn't seem to work either.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

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