Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Hi Guys,
I was wondering if any of you would know how to do this using a macro. I have data on an excel sheet that looks like follows: 1: A 2: A 3: A 4: B 5: C 6: C What I want to be able to do is Fill Color the 3 rows with 'A' yellow, the 1 row with 'B' white, and the 2 rows with 'C' yellow and so on. The data spans between columns A-J (which means I would need to Fill Color A1:J3 yellow for example). Does anyone know of a macro that would be able to do this? Thank you for all your help! Xavier |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Apply conditional formatting to the cells A:J. Here's how:
http://www.officearticles.com/excel/...ft_ excel.htm ******************* ~Anne Troy www.OfficeArticles.com "Xavier" wrote in message oups.com... Hi Guys, I was wondering if any of you would know how to do this using a macro. I have data on an excel sheet that looks like follows: 1: A 2: A 3: A 4: B 5: C 6: C What I want to be able to do is Fill Color the 3 rows with 'A' yellow, the 1 row with 'B' white, and the 2 rows with 'C' yellow and so on. The data spans between columns A-J (which means I would need to Fill Color A1:J3 yellow for example). Does anyone know of a macro that would be able to do this? Thank you for all your help! Xavier |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Hi Xavier,
See xlDynamics CFPlus page at: http://www.xldynamic.com/source/xld.....Download.html --- Regards, Norman "Xavier" wrote in message oups.com... Hi Guys, I was wondering if any of you would know how to do this using a macro. I have data on an excel sheet that looks like follows: 1: A 2: A 3: A 4: B 5: C 6: C What I want to be able to do is Fill Color the 3 rows with 'A' yellow, the 1 row with 'B' white, and the 2 rows with 'C' yellow and so on. The data spans between columns A-J (which means I would need to Fill Color A1:J3 yellow for example). Does anyone know of a macro that would be able to do this? Thank you for all your help! Xavier |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Thanks, but the problem is, this pattern repeats a few thousand times.
So for every other set or rows (ie... those containing values A, C, E, G, I, K, etc), I want to color the cell yellow. The cells containing the values of B, D, F, H, J, etc would be colored white. The problem is, the instances of these data values vary. So 'A' could occur 3 times, 'B' could 1 time, C could occur 2 times, D could occur 10 times, and so on. Therefore, I would need to color fill the entire row containing varying instances of these values in alternating colors. Thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Xavier,
Select your cells, from A1 to J????, and use the formula =ISODD(CODE($A1)) Then set your fill color to yellow. HTH, Bernie MS Excel MVP "Xavier" wrote in message ups.com... Thanks, but the problem is, this pattern repeats a few thousand times. So for every other set or rows (ie... those containing values A, C, E, G, I, K, etc), I want to color the cell yellow. The cells containing the values of B, D, F, H, J, etc would be colored white. The problem is, the instances of these data values vary. So 'A' could occur 3 times, 'B' could 1 time, C could occur 2 times, D could occur 10 times, and so on. Therefore, I would need to color fill the entire row containing varying instances of these values in alternating colors. Thanks! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Ignore my last formula - I forgot that ISODD isn't allowed in CF formulas.
Use thi formula as your CF formula: =MOD(CODE($A1),2)=1 HTH, Bernie MS Excel MVP "Xavier" wrote in message ups.com... Thanks, but the problem is, this pattern repeats a few thousand times. So for every other set or rows (ie... those containing values A, C, E, G, I, K, etc), I want to color the cell yellow. The cells containing the values of B, D, F, H, J, etc would be colored white. The problem is, the instances of these data values vary. So 'A' could occur 3 times, 'B' could 1 time, C could occur 2 times, D could occur 10 times, and so on. Therefore, I would need to color fill the entire row containing varying instances of these values in alternating colors. Thanks! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Thanks, but when I do that, it just highlights all my values. I go to
CF, paste the code in (my data starts in A2 so I change it to $A2), change the fill color to yellow, and hit OK and all the rows that I highlight turn yellow. Any other suggestions? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill Color Rows of Varying Size
Xavier,
Worked for me. What values do you have in column A? Are they all single letters only? Did you select your entire table, with the selection starting at cell A2, prior to applying the CF? If you have problems, contact me privately (take the spaces out and change the dot to . when you reply to me) and I will send you a working example. HTH, Bernie MS Excel MVP "Xavier" wrote in message oups.com... Thanks, but when I do that, it just highlights all my values. I go to CF, paste the code in (my data starts in A2 so I change it to $A2), change the fill color to yellow, and hit OK and all the rows that I highlight turn yellow. Any other suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
highlight subtotal rows with a fill color | Excel Worksheet Functions | |||
ID and/or filter rows with 'Fill Color' | Excel Worksheet Functions | |||
Fill Color is added to additional rows | Excel Discussion (Misc queries) | |||
Default cell comment fill color and font size | Excel Discussion (Misc queries) | |||
sumif range of varying size | Excel Worksheet Functions |