#1   Report Post  
Posted to microsoft.public.excel.misc
PJG PJG is offline
external usenet poster
 
Posts: 8
Default Changing formulas

I am working on a excel staff structure that has an issue with
changing formulas. All formula cells are protected and half are
hidden
but every so often a reference will disapear from a formula. It is
never the same column or row and is only used by only 1 person per
shop no other interferance can be traced. Sometimes it can occour on
a
page that has not been modified.
here is a copy of the formula
=Hours_Worked($A81,C81,C82,$A$2)
hours_worked is the vba part of the program to work out the number of
hours worked and the remainder are reference cells
=Shift_Pay($A81,C$4,C81,C82,$G$2,$D$3,$A$2) +$K84/7
shift_pay works out the pay rates and any penalities in vba and gives
a $ figure

=Hours_Worked($A81,#REF!,#REF!,$A$2)
this is what I get which gives the errors
=Shift_Pay($A81,D$4,#REF!,#REF!,$G$2,$D$3,$A$2) +$K84/7


it is very random when and where it happens, It's like there is a
ghost in it doing what it wants
can any one help me?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Changing formulas

Hi

Take a look at your VBA code.
It looks like the cells are being Deleted when some event happens,
rather than being cleared within the code.


--
Regards

Roger Govier


"PJG" wrote in message
oups.com...
I am working on a excel staff structure that has an issue with
changing formulas. All formula cells are protected and half are
hidden
but every so often a reference will disapear from a formula. It is
never the same column or row and is only used by only 1 person per
shop no other interferance can be traced. Sometimes it can occour on
a
page that has not been modified.
here is a copy of the formula
=Hours_Worked($A81,C81,C82,$A$2)
hours_worked is the vba part of the program to work out the number of
hours worked and the remainder are reference cells
=Shift_Pay($A81,C$4,C81,C82,$G$2,$D$3,$A$2) +$K84/7
shift_pay works out the pay rates and any penalities in vba and gives
a $ figure

=Hours_Worked($A81,#REF!,#REF!,$A$2)
this is what I get which gives the errors
=Shift_Pay($A81,D$4,#REF!,#REF!,$G$2,$D$3,$A$2) +$K84/7


it is very random when and where it happens, It's like there is a
ghost in it doing what it wants
can any one help me?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default Changing formulas

Another thought:

You may have protected the formulas in the cells but what about the cells themselves?

i.e. if another deletes cells, or rows or columns th #REF can occur. Realize that #REF is telling
you that the information in the cell to which it was linked is now gone!

EagleOne
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default Changing formulas

Hi Peter,
If you were to delete Column C between uses
then you would get that error.

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"PJG" wrote in message oups.com...
I am working on a excel staff structure that has an issue with
changing formulas. All formula cells are protected and half are
hidden
but every so often a reference will disapear from a formula. It is
never the same column or row and is only used by only 1 person per
shop no other interferance can be traced. Sometimes it can occour on
a
page that has not been modified.
here is a copy of the formula
=Hours_Worked($A81,C81,C82,$A$2)
hours_worked is the vba part of the program to work out the number of
hours worked and the remainder are reference cells
=Shift_Pay($A81,C$4,C81,C82,$G$2,$D$3,$A$2) +$K84/7
shift_pay works out the pay rates and any penalities in vba and gives
a $ figure

=Hours_Worked($A81,#REF!,#REF!,$A$2)
this is what I get which gives the errors
=Shift_Pay($A81,D$4,#REF!,#REF!,$G$2,$D$3,$A$2) +$K84/7


it is very random when and where it happens, It's like there is a
ghost in it doing what it wants
can any one help me?



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
Formulas Changing Richard Excel Discussion (Misc queries) 0 April 13th 07 03:32 PM
Changing Multiple Formulas japc90 Excel Discussion (Misc queries) 4 December 27th 06 08:24 PM
Automatic Changing of Formulas jecameron Excel Discussion (Misc queries) 2 November 4th 06 05:55 PM
Changing values but not formulas DestinySky Excel Worksheet Functions 1 February 17th 06 09:08 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


All times are GMT +1. The time now is 11:41 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"