Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Routine procedures/formatting same as previous cell

Hi,

I have a 40 tabs spreadsheet. On a weekly basis I need to update half of the
sheets and the rest at the end of the month. Each week I need to add the end
of week data, so basically modify the formatting of the new cells to match
the formatting of the previous cells, extend the border lines to include the
new set of cells in the new column and if there is any formulas in the
previous cell, copy it to the new cell. This only applies to the rows that
has cells filled, for the empty rows nothing should happen. Can I write a
macro that I can use on sheets i need to update to do what i have described
above?

Thanks!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Routine procedures/formatting same as previous cell

The bes way of accomplishing this is with the code below


for each ws in worksheets

if worksheet.name = "teststring" then
Enter your code here
end if
next ws

or

If you name use a unique naming convention for the worksheets that have to
be entered each week verses the ones at the end of the month then you can use
the instr function to make the changes only to certain worksheets.

for each ws in worksheets

if instr(worksheet.name,"teststring") 0 then
Enter your code here
end if
next ws


"Jean" wrote:

Hi,

I have a 40 tabs spreadsheet. On a weekly basis I need to update half of the
sheets and the rest at the end of the month. Each week I need to add the end
of week data, so basically modify the formatting of the new cells to match
the formatting of the previous cells, extend the border lines to include the
new set of cells in the new column and if there is any formulas in the
previous cell, copy it to the new cell. This only applies to the rows that
has cells filled, for the empty rows nothing should happen. Can I write a
macro that I can use on sheets i need to update to do what i have described
above?

Thanks!!

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
Conditional Formatting VBA Routine 1brad19 Excel Discussion (Misc queries) 0 May 27th 10 08:56 PM
typing in a new cell and carrying the formatting of the previous c fadwa Excel Worksheet Functions 2 January 20th 10 12:21 PM
Copy Formatting of previous worksheet smoothjazz36 Excel Discussion (Misc queries) 3 February 26th 07 06:58 PM
formatting cell number based on previous cell number Pasquini Excel Discussion (Misc queries) 3 June 20th 06 06:36 AM
Copy Cell Routine (FAO Tom Ogilvie) Gazza Excel Programming 3 September 26th 05 05:41 PM


All times are GMT +1. The time now is 04:08 AM.

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"