diff -urp --exclude=CVS sc.clean/inc/rangenam.hxx sc/inc/rangenam.hxx
--- sc.clean/inc/rangenam.hxx	2007-11-14 10:13:09.000000000 -0500
+++ sc/inc/rangenam.hxx	2007-11-14 15:20:46.000000000 -0500
@@ -155,6 +155,7 @@ public:
 	void			UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
 
 	BOOL			IsReference( ScRange& rRef ) const;
+	BOOL			IsReference( ScRange& rRef, const ScAddress& rPos ) const;
 	BOOL			IsValidReference( ScRange& rRef ) const;
 
 	BOOL			IsRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
diff -urp --exclude=CVS sc.clean/source/core/tool/interpr1.cxx sc/source/core/tool/interpr1.cxx
--- sc.clean/source/core/tool/interpr1.cxx	2007-11-14 10:13:15.000000000 -0500
+++ sc/source/core/tool/interpr1.cxx	2007-11-14 16:04:54.000000000 -0500
@@ -71,5 +71,6 @@
 #include "cellkeytranslator.hxx"
 #include "lookupcache.hxx"
+#include "rangenam.hxx"
 
 #define	SC_DOUBLE_MAXVALUE	1.7e307
 
@@ -5686,7 +5687,7 @@ void ScInterpreter::ScIndirectXL()
 		conv = ScAddress::CONV_XL_R1C1;
 
 	if ( MustHaveParamCount( nParamCount, 1, 2 )  )
-		{
+    {
 		ScAddress::Details const details( conv, aPos );
 		SCTAB nTab = aPos.Tab();
 		String sRefStr( GetString() );
@@ -5697,7 +5698,40 @@ void ScInterpreter::ScIndirectXL()
 		else if ( ConvertSingleRef ( pDok, sRefStr, nTab, aRefAd, details ) )
 			PushSingleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab() );
 		else
-			SetIllegalArgument();
+        {
+            do
+            {
+                ScRangeName* pNames = pDok->GetRangeName();
+                if (!pNames)
+                    break;
+
+                USHORT nPos = 0;
+                if (!pNames->SearchName(sRefStr, nPos)) 
+                    break;
+
+                ScRangeData* rData = (*pNames)[nPos];
+                if (!rData)
+                    break;
+
+                rData->ValidateTabRefs();
+        
+                ScRange aRange;
+                if (!rData->IsReference(aRange, ScAddress(aPos.Tab(), 0, 0))) 
+                    break;
+
+                if ( aRange.aStart == aRange.aEnd )
+                    PushSingleRef(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab());
+                else
+                    PushDoubleRef(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab(),
+                                  aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab());
+
+                // success!
+                return;
+            } 
+            while (false);
+
+            SetIllegalArgument();
+        }
 	}
 }
 
@@ -5719,7 +5753,41 @@ void ScInterpreter::ScIndirect()
 		else if ( ConvertSingleRef( pDok, sRefStr, nTab, aRefAd ) )
 			PushSingleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab() );
 		else
-			SetIllegalArgument();
+        {
+            do
+            {
+                ScRangeName* pNames = pDok->GetRangeName();
+                if (!pNames)
+                    break;
+
+                USHORT nPos = 0;
+                if (!pNames->SearchName(sRefStr, nPos)) 
+                    break;
+
+                ScRangeData* rData = (*pNames)[nPos];
+                if (!rData)
+                    break;
+
+                // we need this in order to obtain good range
+                rData->ValidateTabRefs();
+        
+                ScRange aRange;
+                if (!rData->IsReference(aRange, aPos)) 
+                    break;
+
+                if ( aRange.aStart == aRange.aEnd )
+                    PushSingleRef(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab());
+                else
+                    PushDoubleRef(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab(),
+                                  aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab());
+
+                // success!
+                return;
+            } 
+            while (false);
+
+            SetIllegalArgument();
+        }
 	}
 }
 
diff -urp --exclude=CVS sc.clean/source/core/tool/rangenam.cxx sc/source/core/tool/rangenam.cxx
--- sc.clean/source/core/tool/rangenam.cxx	2007-11-14 10:13:15.000000000 -0500
+++ sc/source/core/tool/rangenam.cxx	2007-11-14 16:40:08.000000000 -0500
@@ -41,6 +41,7 @@
 
 #include <tools/debug.hxx>
 #include <string.h>
+#include <memory>
 #include <unotools/collatorwrapper.hxx>
 #ifndef _UNOTOOLS_TRANSLITERATIONWRAPPER_HXX
 #include <unotools/transliterationwrapper.hxx>
@@ -486,6 +487,22 @@ BOOL ScRangeData::IsReference( ScRange& 
     return FALSE;
 }
 
+BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
+{
+	if ( eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) )
+		if ( pCode )
+        {
+            ::std::auto_ptr<ScTokenArray> pTemp( pCode->Clone() );
+            ScCompiler aComp( pDoc, rPos, *pTemp );
+            aComp.SetCompileEnglish( false );
+            aComp.SetCompileXML( false );
+            aComp.MoveRelWrap();
+            return pTemp->IsReference( rRange );
+        }
+
+    return FALSE;
+}
+
 BOOL ScRangeData::IsValidReference( ScRange& rRange ) const
 {
     if ( eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) )
Only in sc: unxlngi6.pro
