LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Function cannot obtain cell values

I have a large spreadsheet (200 Mb) in which I create a user defined
VBA function that reads two columns of data and then computes various
results using these values. The first column (dates) is numeric; it
contains only values and has no formulas. The second column (Returns)
has complex formulas that evaluate to values. My function is coded as
follows:

Public Function Drawdown(dates As Range, Returns As Range)

d11 = dates.Cells(1).Value
d12 = dates.Cells(2).Value

r11 = Returns.Cells(1).Value
r12 = Returns.Cells(2).Value
..
..
Drawdown = results
end

the cells containing dates have just values (i.e. no fomulas), while
the cells containing Returns have valid formulas in them. But if I
single step through the macro, d11 and d12 consistently evaluate to
numbers, while r11 and r12 consistently evaluate to Empty. However, if
the macro is re-executed many times, r11 and r12 eventually evaluate
to the appropriate values. I have tried this in Excel 2002 and Excel
2007 - I get the same result. On the other hand, if I create a new
small spreadsheet with just two cells in the date range and two cells
in the Returns range with some simple formulas, it seems to work fine
- r11 and r12 assume the correct values right away. What could be the
problem here? Does the size of the spreadsheet (200 MB) somehow
prevent Excel from allowing the function to evaluate all the
spreadsheet functions in the Returns range? If so, what is the
solution?

Thanks in advance for your assistance

Thomas Philips
 
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
Need hyperlink function to obtain range name from a cell (contents DW Excel Worksheet Functions 4 January 12th 08 11:07 PM
Using vlookup - how can I obtain a sum of values, not just first v Terri Excel Worksheet Functions 1 June 12th 06 05:52 PM
Can I obtain x values from y values on an Excel chart? Helen Charts and Charting in Excel 1 March 7th 06 03:05 PM
How do I obtain the address of a cell using the vlookup function? Spock Excel Worksheet Functions 2 May 16th 05 06:35 PM
Would like to Obtain a Cell Address from a vlookup function CR_2004_04_08 Excel Programming 3 April 9th 04 11:12 AM


All times are GMT +1. The time now is 05:43 AM.

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

About Us

"It's about Microsoft Excel"