Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


Hi everyone,

I have a sheet that has seperate rows for task ETCs
followed by (on the same row) a column for days used, remaining etc an
then a column fo each day) - almost like a gant chart but in excel.

I have attached the spreadsheet to this post.

I need to program something that will go through each row, look at th
number in column B, ans then shade from column E onwards by tha
number...

in the top row I have manually shaded the cells required.

can anyoen suggest how I coudl acheive this with VBA?

thanks in advance,
Mat

+-------------------------------------------------------------------
|Filename: gantsheet.zip
|Download: http://www.excelforum.com/attachment.php?postid=4624
+-------------------------------------------------------------------

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=53261

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


Conditional formatting is what you want. It's under the Format menu.

I've added a simplified version of yours to get you started.

Enjoy!


+-------------------------------------------------------------------+
|Filename: gantsheet.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4625 |
+-------------------------------------------------------------------+

--
cm_gmail
------------------------------------------------------------------------
cm_gmail's Profile: http://www.excelforum.com/member.php...o&userid=33451
View this thread: http://www.excelforum.com/showthread...hreadid=532619

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


thanks for your reply, I have ajusted this slightly to use a pattern etc
- and it works great!!
:)


I'm concerned that the end user will start to put dates rather than day
numbers as the column headings.
If this happens, the conditional formatting wont work.
do you (or anyone else) know of a way around that?

cheers,
Matt


--
matpj
------------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=532619

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


thanks for your reply, I have ajusted this slightly to use a pattern et
- and it works great!!
:)


I'm concerned that the end user will start to put dates rather than da
numbers as the column headings.
If this happens, the conditional formatting wont work.
do you (or anyone else) know of a way around that?

cheers,
Mat

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=53261

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


thanks for your reply, I have ajusted this slightly to use a pattern etc
- and it works great!!
:)


I'm concerned that the end user will start to put dates rather than day
numbers as the column headings.
If this happens, the conditional formatting wont work.
do you (or anyone else) know of a way around that?

cheers,
Matt


--
matpj
------------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
View this thread: http://www.excelforum.com/showthread...hreadid=532619



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


Got an example of what you think they may do?


--
cm_gmail
------------------------------------------------------------------------
cm_gmail's Profile: http://www.excelforum.com/member.php...o&userid=33451
View this thread: http://www.excelforum.com/showthread...hreadid=532619

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


You could try using cell data validation and limit the type of data tha
cell(s) can hold.
It's located under Data Validation...

You could also use comments to remind the user what type of data i
requested.

Scot

--
hannon
-----------------------------------------------------------------------
hannons's Profile: http://www.excelforum.com/member.php...fo&userid=3346
View this thread: http://www.excelforum.com/showthread.php?threadid=53261

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


You could try using cell data validation and limit the type of data that
cell(s) can hold.
It's located under Data Validation...

You could also use comments to remind the user what type of data is
requested.

Scott


--
hannons
------------------------------------------------------------------------
hannons's Profile: http://www.excelforum.com/member.php...o&userid=33465
View this thread: http://www.excelforum.com/showthread...hreadid=532619

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shading cells in a row based on another cell


thanks for your replies.

it seems that there is a bigger problem here.

the tasks (individual rows) will not all start at the same time.
It looks like I'm going to have to process each row in turn by startin
at column F and moving 1 cell to the right until I come across th
yellow shading - not sure what he code is for that colour.

then using the figure in column C for that row, apply a pattern fo
that number.

so logically the steps would be:

1. for each row in range
2. store value of column c as a variable.
3. start at column F and increment by one (do until) cell shading is
specified value
4. select that cell plus the number of cells equivalent to variabl
stored in '2'.
5. move to next row and repeat.

can anyone help me with the for each row and the stepping through th
row column by column...

thanks in advance,
Mat

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=53261

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
Shading Cells based on Date Lee Quillen Excel Worksheet Functions 1 September 17th 08 04:49 PM
Is there a way to add cells based on their shading / fill colour? ChefAtSea Excel Discussion (Misc queries) 2 July 4th 07 01:22 PM
Conditional Cell Shading (based on the shading of other cells) Tubby Excel Worksheet Functions 2 June 20th 06 10:03 PM
Apply cell shading based on adjacent cells in EXCEL garywr Excel Worksheet Functions 3 September 10th 05 01:35 PM
Shading cells based on Other Sheet Value? RustyR Excel Programming 1 October 5th 04 10:52 PM


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