Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bob Phillips
 
Posts: n/a
Default

The code is?

Could well be unqualified ranges, such as

Worksheets("Sheet1").Range(Cells(A,1),Cells(2,2))

The Range refers to Sheet1 as it is qualified, but the Cells refer to the
active sheet as they are not.

--
HTH

Bob Phillips

"Andres" wrote in
message ...

I have a VBA code to calculate a "conditional average" of the days used
to issued official documents, given a range, and ID of the entity and
the column I want to calculate.
When I use the function in the same sheet I have the information to be
calculated, it works well. However, when using it in a different sheet
(of the same workbook), an error message is displayed.
It seems there's a reference problem when working with ranges, but I
have not found how to solve it.
Does anybody know what should I change for this function to work
properly?
Thank you very much in advance!


--
Andres
------------------------------------------------------------------------
Andres's Profile:

http://www.excelforum.com/member.php...o&userid=26096
View this thread: http://www.excelforum.com/showthread...hreadid=394273



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
function for average without zero kml Excel Worksheet Functions 3 August 9th 05 05:48 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Is there an AVERAGE IF function in Excel? eliwaite Excel Worksheet Functions 3 May 16th 05 11:17 PM
How do I nesting subtotal function within average function in Exc Amy Yeh Excel Worksheet Functions 4 January 19th 05 06:23 PM
Using Average function when number is zero Deb Excel Worksheet Functions 3 November 6th 04 01:01 AM


All times are GMT +1. The time now is 06:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"