Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sherry
 
Posts: n/a
Default Omit/bypass cells in column equations

Hello! I have a worksheet macro as follows:

Sub InsertNewRow()

ActiveSheet.Unprotect
Rows("10:10").Select
Selection.Insert Shift:=xlDown
Range("10:10").Select
Selection.Locked = True
Range("11:11").Select
Selection.Locked = False
ActiveSheet.Protect

End Sub

The of cells from and inclusive $D$11 to $D$15 are named 'Recent'

The of cell s from and inclusive $D$11 to $D$65536 are named 'EvalTotal'

I need to change this to make cells D6 display the 'Recent' Average

and D7 to display the 'EvalTotal' Average

My problems are as follows:

1) When I insert a new row using the macro shown above cell numbers change
for 'Recent' to $D$12 to $D$16 and 'EvalTotal' to $D$12 to $D$65536

2) If the cell range for 'Recent' and 'EvalTotal' change-then the results
for 'Recent Average' and 'EvalTotal Average' will not reflect an accurate
conclusion

I have tried to explain this clearly but it is difficult to do so.

Please ask for further clarification if required to lead to any helpful
suggestions

Cheers Sherry



  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

If you change the definition of the Recent range to

=OFFSET(Sheet1!$D$6,5,0,5,1)

and change EvalTotal to

=OFFSET(Sheet1!$D$6,5,0,65526,1)

they will be impervious to the changes from InsertNewRow

Alternatively, you could redefine you ranges in the macro, after the row
insertion

"Sherry" wrote:

Hello! I have a worksheet macro as follows:

Sub InsertNewRow()

ActiveSheet.Unprotect
Rows("10:10").Select
Selection.Insert Shift:=xlDown
Range("10:10").Select
Selection.Locked = True
Range("11:11").Select
Selection.Locked = False
ActiveSheet.Protect

End Sub

The of cells from and inclusive $D$11 to $D$15 are named 'Recent'

The of cell s from and inclusive $D$11 to $D$65536 are named 'EvalTotal'

I need to change this to make cells D6 display the 'Recent' Average

and D7 to display the 'EvalTotal' Average

My problems are as follows:

1) When I insert a new row using the macro shown above cell numbers change
for 'Recent' to $D$12 to $D$16 and 'EvalTotal' to $D$12 to $D$65536

2) If the cell range for 'Recent' and 'EvalTotal' change-then the results
for 'Recent Average' and 'EvalTotal Average' will not reflect an accurate
conclusion

I have tried to explain this clearly but it is difficult to do so.

Please ask for further clarification if required to lead to any helpful
suggestions

Cheers Sherry



  #3   Report Post  
Sherry
 
Posts: n/a
Default

OKay Hmmm!

Thanks Duke!

I think lol!

I have no idea what that means but I am trialing it now!!!

and attempting to grasp what actions it is actually perfoprming in it
execution

and.......perhaps even more importantly, how and why it bloody works!

So to rate your post would be premeture although I am sure it WILL prove to
be a valuable insite it this EXCEL programming corridoor!

Gee I will be glan when i see the light at the end of THIS corridoor!

Guess I should have included that I am absolute rank ameture and to compound
matters I am pathetic at maths (Seems spelling fits that catagory too lol)
Soooory!

I'll get back to u but thank u so far!............

Cheers Sherry


"Duke Carey" wrote:

If you change the definition of the Recent range to

=OFFSET(Sheet1!$D$6,5,0,5,1)

and change EvalTotal to

=OFFSET(Sheet1!$D$6,5,0,65526,1)

they will be impervious to the changes from InsertNewRow

Alternatively, you could redefine you ranges in the macro, after the row
insertion

"Sherry" wrote:

Hello! I have a worksheet macro as follows:

Sub InsertNewRow()

ActiveSheet.Unprotect
Rows("10:10").Select
Selection.Insert Shift:=xlDown
Range("10:10").Select
Selection.Locked = True
Range("11:11").Select
Selection.Locked = False
ActiveSheet.Protect

End Sub

The of cells from and inclusive $D$11 to $D$15 are named 'Recent'

The of cell s from and inclusive $D$11 to $D$65536 are named 'EvalTotal'

I need to change this to make cells D6 display the 'Recent' Average

and D7 to display the 'EvalTotal' Average

My problems are as follows:

1) When I insert a new row using the macro shown above cell numbers change
for 'Recent' to $D$12 to $D$16 and 'EvalTotal' to $D$12 to $D$65536

2) If the cell range for 'Recent' and 'EvalTotal' change-then the results
for 'Recent Average' and 'EvalTotal Average' will not reflect an accurate
conclusion

I have tried to explain this clearly but it is difficult to do so.

Please ask for further clarification if required to lead to any helpful
suggestions

Cheers Sherry



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
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
copy every 30th cell in the column into consecutive cells in anoth shortcuts Excel Worksheet Functions 2 March 29th 05 07:28 AM
ADDING SUM TOTAL OF MORE THAN 30 CELLS IN A COLUMN TOGETHER - WON. Robin Smith Excel Discussion (Misc queries) 0 December 20th 04 08:47 PM
Return non-zero cells in column Greg Excel Worksheet Functions 5 December 11th 04 12:55 PM


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