protected static Ptg calcRows( Ptg[] operands ) throws FunctionNotSupportedException
	{
		try
		{
			int rsz = 0;
			if( operands[0] instanceof PtgStr )
			{
				String rangestr = operands[0].getValue().toString();
				String startx = rangestr.substring( 0, rangestr.indexOf( ":" ) );
				String endx = rangestr.substring( rangestr.indexOf( ":" ) + 1 );

				int[] startints = ExcelTools.getRowColFromString( startx );
				int[] endints = ExcelTools.getRowColFromString( endx );
				rsz = endints[0] - startints[0];
				rsz++; // inclusive
			}
			else if( operands[0] instanceof PtgName )
			{
				int[] rc = ExcelTools.getRangeCoords( operands[0].getLocation() );
				rsz = rc[2] - rc[0];
				rsz++; // inclusive
			}
			else if( operands[0] instanceof PtgRef )
			{
				int[] rc = ExcelTools.getRangeCoords( ((PtgRef) operands[0]).getLocation() );
				rsz = rc[2] - rc[0];
				rsz++; // inclusive
			}
			else if( operands[0] instanceof PtgMemFunc )
			{
				Ptg[] p = operands[0].getComponents();
				if( (p != null) && (p.length > 0) )
				{
					int[] rc0 = p[0].getIntLocation();
					int[] rc1 = null;
					if( p.length > 1 )
					{
						rc1 = p[p.length - 1].getIntLocation();
					}
					if( rc1 == null )
					{
						rsz = 0;
					}
					else
					{
						rsz = rc1[0] - rc0[0];
					}
					rsz++;
				}
				else
				{
					return new PtgErr( PtgErr.ERROR_VALUE );
				}
			}
			else
			{
				return new PtgErr( PtgErr.ERROR_VALUE );
			}
			return new PtgInt( rsz );
		}
		catch( Exception e )
		{
		}
		return new PtgErr( PtgErr.ERROR_VALUE );
	}