Zafirah_Iqbal
New Member
- Joined
- Mar 13, 2017
- Messages
- 1
Hi,
I'm new to VBA. I need a VBA macro which can change the colour of the cells based on rules applied.
[TABLE="width: 305"]
<tbody>[TR]
[TD="align: center"]B1[/TD]
[TD="align: center"]B2[/TD]
[TD="align: center"]B3[/TD]
[TD="align: center"]B4[/TD]
[TD="align: center"]B5[/TD]
[/TR]
[TR]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.01a[/TD]
[TD]0.02a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.03b[/TD]
[TD]0.01ab[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.06a[/TD]
[TD]0.03a[/TD]
[TD]0.07a[/TD]
[TD]0.04a[/TD]
[TD]0.06a[/TD]
[/TR]
[TR]
[TD]0.15a[/TD]
[TD]0.18ab[/TD]
[TD]0.27b[/TD]
[TD]0.26b[/TD]
[TD]0.22ab[/TD]
[/TR]
</tbody>[/TABLE]
Rules are
Thanks for your help !!
I'm new to VBA. I need a VBA macro which can change the colour of the cells based on rules applied.
<tbody>[TR]
[TD="align: center"]B1[/TD]
[TD="align: center"]B2[/TD]
[TD="align: center"]B3[/TD]
[TD="align: center"]B4[/TD]
[TD="align: center"]B5[/TD]
[/TR]
[TR]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.01a[/TD]
[TD]0.02a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.03b[/TD]
[TD]0.01ab[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[TD]0.00a[/TD]
[/TR]
[TR]
[TD]0.06a[/TD]
[TD]0.03a[/TD]
[TD]0.07a[/TD]
[TD]0.04a[/TD]
[TD]0.06a[/TD]
[/TR]
[TR]
[TD]0.15a[/TD]
[TD]0.18ab[/TD]
[TD]0.27b[/TD]
[TD]0.26b[/TD]
[TD]0.22ab[/TD]
[/TR]
</tbody>[/TABLE]
Rules are
- Any alphabet which is present in criteria column (B1) should not be highlighted in B2,B3 and B4
- Any alphabet which is greater than the criteria (B1) should be highlighted in Green for B2,B3 and B4 . For eg : A is greater than B
- Any alphabet which is lesser than the criteria (B1) should be highlighted in Red for in B2,B3 and B4. For eg: A and B are lesser than C
Thanks for your help !!