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: 419
Default Programmatically changing values on grouped sheets

Hello all,

I have 2 sheets that are identical in format, layout, formulas. The only
difference is some cells hold values. One sheet is current period
(9/30/2007) and the other sheet is prior period (6/30/2007). We are doing
an update sooooo...the data on the Current sheet (9/30/2007) will be moved
to the Prior sheet and new data (12/31/2007) will be pasted on the Current
sheet.

If I group the 2 sheets together, then manually go into each cell on the
Current sheet, edit the cell ([F2]) and then hit enter w/o making any
changes, the data on both sheets will be the same.

But, if I group the 2 sheets together, select the data range on the Current
sheet, then run the following code, it does not make the data on the Prior
sheet match the data on the Current sheet (Prior's data is unchanged...still
6/30/2007's data and not changed to 9/30/2007's data):

Sub LoopCells()
Dim c As Range
For Each c In Selection
c.Value = "zzz" & c.Value
c.Value = Replace(c.Value, "zzz", "")
Next c
End Sub

Why not? What is a quick, easy way to accomplish this?

Thanks for any help anyone can provide,

Conan Kelly


 
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
Replace with Grouped Sheets Jim May Excel Discussion (Misc queries) 4 September 15th 06 02:19 PM
Changing footer programmatically in multiple sheets all at once alan674 Excel Programming 2 July 6th 05 11:28 AM
Grouped Sheets and Formating Pank Mehta Excel Discussion (Misc queries) 3 March 24th 05 01:42 AM
Changing Text in grouped shapes sebastienm Excel Programming 1 August 1st 04 02:54 PM
Printing Grouped Sheets Elaine Roden Excel Programming 4 May 31st 04 06:06 PM


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