Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Counting and totals with formatting


Need some help creating a macro (obviously why I'm here, right?)

What I'm trying to do is the following, and I'm not very skilled with
macros yet, but learning:

Item 1: Check if the value of a cell is in any cell in the next 2
columns, if so, change the cell shading to yellow. Check if the value
of a cell was in any cell in the previous 2 columns, if so, change the
shading of the cell to green. Also, check to see if the value was used
10 times in the previous 20 columns, if so, change the shading to dark
green.

Idealy this would actually work in checking the only column 2 back from
the given cell (x-2) and not both. However, the value of column (x-1)
doesn't effect things much nor will it ever be the same, so using the
previous 2 works.

For the previous 20 columns, it would be (x-2,x-4,x-6..etc). Basiclly,
there is a column between each of the ones I want to effect.

Basiclly, if the same value is in any cell in a given row for 3 columns
then it will be shaded (cell in column 1 will become yellow, cell in
column 2 is uneffected, cell in column 3 becomes green, again, I am not
concerned with what happens to the formatting in the 'filler' cells).
And, if the value is found 10 times in a row (twenty columns counting
the filler columns) the tenth entry becomes dark green (resulting in
the first yellow, the next eight green and the tenth dark green (again
dismissing the columns between)

Item 2: This one should be easy. Check if a cell value is in an array
of values, if so, change the shading. I'm still trying to figure out
arrays with macros in excel :(

Both these need to be able to be run against the entire worksheet, not
just an individule cell.

Gonna go back to hacking away on it myself, just hope maybe someone
know already to save me a lot of time and frustration trying! Thanks


--
rbmcc
------------------------------------------------------------------------
rbmcc's Profile: http://www.excelforum.com/member.php...o&userid=30602
View this thread: http://www.excelforum.com/showthread...hreadid=530176

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
Pivot table and counting totals Vabu3184 Excel Worksheet Functions 0 May 22nd 06 05:07 AM
Counting (sub)totals glince Excel Worksheet Functions 0 March 17th 05 09:19 AM
Counting columns, adding totals #2 Dennis Allen Excel Programming 2 July 5th 04 04:59 AM
Counting columns, adding totals #2 Dennis Allen Excel Programming 1 July 2nd 04 08:13 PM
Counting columns, adding totals Dennis Allen Excel Programming 7 July 1st 04 07:34 PM


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