Macros & Conditional Formatting

diddymacs

New Member
Joined
Nov 3, 2011
Messages
1
I have created a spreadsheet which contains a list of approximately 500 clients and their associated ranking (A, B, C, etc). The rankings are listed in Column A and the client name in Column B.

I would like to create buttons that when pressed will hi-lite the client names based on their ranking ("Button A" hi-lites all A clients, "Button B" hi-lites all B clients, etc.)

I'm pretty comfortable inputting formulas/conditional formatting but don't have much experience with macros.

Any help is greatly appreciated!
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
Welcome to the Board!

The Conditional Formatting formula could do most of the work.
The screen shot below shows one approach...
Excel Workbook
AB
1B
2
3RankingClient
4AAlpha
5BBaker
6CCharlie
Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B41. / Formula is =$A$1=A4Abc


Your macro just needs to write A, B or C into Cell A1.
Range("A1")="B"
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top