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: 26
Default Amending Cell formatting with VBA

Hi
I have a sheet with peoples names in column A, anything from 30 to 450
names.
In the columns from B for up to 100 columns there will be Paytpes linked to
each person. These columns initially are hidden.
What I then do is for each persons relevant paytype I want to change the
colour of the cell, unlock it and change its width to 10.

This is working well at the moment but it is quite slow and each for each
cell to be formatted takes up to a second or two. For the sheet with 450
people and anything up to 10 paytypes each, this is quite a long time.

My thoughts are to have a named range, and add each employee/paytype cell to
that named range and then format the named range at the end.
I can see how to create a named range and refer to cells and this is fine if
you know at the time of creating the named range which cells are to be
refered to.

ActiveWorkbook.Names.Add Name:="TestNamedRange", RefersToR1C1:= _
"=Timesheet!R4C4,Timesheet!R7C4,Timesheet!R10C4,Ti mesheet!R12C6,Timesheet!R15C4"

BUT my questions are :-
How can I append more cells to the end of the list of cells?
Is there a limit to the number of cells that can be added?
Will it be any quicker than formating the cells individually as I am doing
at the moment?

Can anyone point me in the right direction.

many Thanks

Chris



 
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
Why is Excel amending formatting itself, when i sort a sheet? Reddhed Excel Discussion (Misc queries) 1 December 10th 09 03:45 PM
Amending a formula leerem Excel Discussion (Misc queries) 3 August 4th 08 01:48 PM
Amending another formula leerem Excel Discussion (Misc queries) 3 August 4th 08 10:54 AM
Help amending code Steve Excel Discussion (Misc queries) 4 August 17th 05 03:57 PM
Help with Amending this Code Please [email protected] Excel Worksheet Functions 4 February 1st 05 07:04 PM


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