Routine procedures/formatting same as previous cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top