Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
JMC JMC is offline
external usenet poster
 
Posts: 14
Default how to update data displayed from a UDF when the source data chang

I have a workbook that I am trying to use a user defined function to always
reference the previous sheet so I can make several copies of the sheet to
cover a 52 week period. I have made it this far. However when I change the
data and then go to the next sheet the calculations do not automatically
update. I have tried to refresh the data and re-calculate the sheet but the
calculation does not update. Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default how to update data displayed from a UDF when the source data chang

JMC

I don't seem to have a problem with this UDF not updating.

Is yours similar?

Function PrevSheet(rg As Range)
Application.Volatile
n = Application.Caller.Parent.Index
If n = 1 Then
PrevSheet = CVErr(xlErrRef)
ElseIf TypeName(Sheets(n - 1)) = "Chart" Then
PrevSheet = CVErr(xlErrNA)
Else
PrevSheet = Sheets(n - 1).Range(rg.Address).Value
End If
End Function


Gord Dibben MS Excel MVP

On Tue, 5 Sep 2006 14:49:01 -0700, JMC wrote:

I have a workbook that I am trying to use a user defined function to always
reference the previous sheet so I can make several copies of the sheet to
cover a 52 week period. I have made it this far. However when I change the
data and then go to the next sheet the calculations do not automatically
update. I have tried to refresh the data and re-calculate the sheet but the
calculation does not update. Any help would be appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.newusers
JMC JMC is offline
external usenet poster
 
Posts: 14
Default how to update data displayed from a UDF when the source data c

Sorry its taken so long to respond. Work, Work, Work
"Application.Volatile"
missing from the UDF i had. once i put that in everything worked just fine.
thanks for taking the time to help me out. People like you make life easier
for amatures like me.

thanks again
JMC



"Gord Dibben" wrote:

JMC

I don't seem to have a problem with this UDF not updating.

Is yours similar?

Function PrevSheet(rg As Range)
Application.Volatile
n = Application.Caller.Parent.Index
If n = 1 Then
PrevSheet = CVErr(xlErrRef)
ElseIf TypeName(Sheets(n - 1)) = "Chart" Then
PrevSheet = CVErr(xlErrNA)
Else
PrevSheet = Sheets(n - 1).Range(rg.Address).Value
End If
End Function


Gord Dibben MS Excel MVP

On Tue, 5 Sep 2006 14:49:01 -0700, JMC wrote:

I have a workbook that I am trying to use a user defined function to always
reference the previous sheet so I can make several copies of the sheet to
cover a 52 week period. I have made it this far. However when I change the
data and then go to the next sheet the calculations do not automatically
update. I have tried to refresh the data and re-calculate the sheet but the
calculation does not update. Any help would be appreciated.



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
Pivottable - use same source data, and group data differently Todd1 Excel Discussion (Misc queries) 1 May 14th 06 03:00 PM
Setting hover data labels to cells other than source data Darren Charts and Charting in Excel 1 January 24th 06 10:20 AM
Charts not recognizing source data if original linked data is changed. JLC Charts and Charting in Excel 3 October 14th 05 01:29 AM
Chart/Source Data update problem Rich Charts and Charting in Excel 1 July 4th 05 04:35 PM
How do I automatically update chart source data links for moved fi Suzuki7 Charts and Charting in Excel 2 February 15th 05 03:55 AM


All times are GMT +1. The time now is 03:35 PM.

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"