Excel Formatting

Dutch1956

Board Regular
Joined
Sep 14, 2010
Messages
80
Is it possible to assign a random color to the background of cells where the value in Column A are duplicates? M21117 and the cells behind it to have a different color and the cells with the M21118 value to have a different color than the others, etc. Any help is appreciated.

<table border="0" cellpadding="0" cellspacing="0" width="407"><colgroup><col style="mso-width-source:userset;mso-width-alt:2925;width:60pt" width="80"> <col style="mso-width-source:userset;mso-width-alt:2596;width:53pt" width="71"> <col style="width:48pt" width="64"> <col style="width:48pt" span="2" width="64"> <col style="width:48pt" width="64"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td class="xl69" style="height:12.75pt;width:60pt" height="17" width="80">
</td> <td class="xl69" style="width:53pt" width="71">
</td> <td class="xl70" style="width:48pt" width="64">Time</td> <td class="xl70" style="width:48pt" width="64">
</td> <td class="xl79" style="width:48pt" width="64">Login</td> <td class="xl90" style="width:48pt" width="64">Logout</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl73" style="height:12.75pt" height="17">M21117</td> <td class="xl84">Login</td> <td class="xl76">15:30</td> <td class="xl81">
</td> <td class="xl74">15:30</td> <td class="xl76">00:00</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl71" style="height:12.75pt" height="17">M21118</td> <td class="xl85">Login</td> <td class="xl77">00:00</td> <td class="xl81">
</td> <td class="xl72">00:00</td> <td class="xl77">08:30</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl71" style="height:12.75pt" height="17">M21118</td> <td class="xl89">Logout</td> <td class="xl77">00:04</td> <td class="xl81">
</td> <td class="xl72"> </td> <td class="xl77"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl71" style="height:12.75pt" height="17">M21118</td> <td class="xl85">Login</td> <td class="xl77">00:04</td> <td class="xl81">
</td> <td class="xl72"> </td> <td class="xl77"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl71" style="height:12.75pt" height="17">M21118</td> <td class="xl85">Logout</td> <td class="xl77">08:06</td> <td class="xl81">
</td> <td class="xl72"> </td> <td class="xl77"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl75" style="height:12.75pt" height="17">M21119</td> <td class="xl86">Login</td> <td class="xl78">00:00</td> <td class="xl81">
</td> <td class="xl95">00:00</td> <td class="xl96">06:00</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl75" style="height:12.75pt" height="17">M21119</td> <td class="xl86">Logout</td> <td class="xl78">06:00</td> <td class="xl81">
</td> <td class="xl95">08:00</td> <td class="xl96">12:30</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl75" style="height:12.75pt" height="17">M21119</td> <td class="xl86">Login</td> <td class="xl78">08:00</td> <td class="xl81">
</td> <td class="xl95"> </td> <td class="xl96"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl75" style="height:12.75pt" height="17">M21119</td> <td class="xl86">Logout</td> <td class="xl78">12:30</td> <td class="xl81">
</td> <td class="xl95"> </td> <td class="xl96"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl80" style="height:12.75pt" height="17">M21126</td> <td class="xl87">Login</td> <td class="xl82">08:33</td> <td class="xl81">
</td> <td class="xl83">08:30</td> <td class="xl82">12:30</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl80" style="height:12.75pt" height="17">M21126</td> <td class="xl87">Logout</td> <td class="xl82">12:32</td> <td class="xl81">
</td> <td class="xl83"> </td> <td class="xl82"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl97" style="height:12.75pt" height="17">M21177</td> <td class="xl91">Login</td> <td class="xl92">06:00</td> <td class="xl81">
</td> <td class="xl93">06:00</td> <td class="xl94">14:30</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl97" style="height:12.75pt" height="17">M21177</td> <td class="xl91">Logout</td> <td class="xl92">13:02</td> <td class="xl81">
</td> <td class="xl93"> </td> <td class="xl94"> </td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt" height="17">M21377</td> <td class="xl88">Login</td> <td class="xl81">16:30</td> <td class="xl81">
</td> <td class="xl68">16:30</td> <td class="xl81">00:00</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt" height="17">M21382</td> <td class="xl88">Login</td> <td class="xl81">16:31</td> <td class="xl81">
</td> <td class="xl68">16:31</td> <td class="xl81">18:01</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt" height="17">M21382</td> <td class="xl88">Logout</td> <td class="xl81">18:01</td> <td class="xl81">
</td> <td class="xl68">18:30</td> <td class="xl81">22:30</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt" height="17">M21382</td> <td class="xl88">Login</td> <td class="xl81">18:30</td> <td class="xl81">
</td> <td class="xl68">
</td> <td class="xl81">
</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt" height="17">M21382</td> <td class="xl88">Logout</td> <td class="xl81">22:32</td> <td class="xl81">
</td> <td class="xl68">
</td> <td class="xl81">
</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17">
</td> <td>
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl81">
</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17">
</td> <td>
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl81">
</td> </tr> <tr style="height:12.75pt" height="17"> <td style="height:12.75pt" height="17">
</td> <td>
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl67">
</td> <td class="xl81">
</td> </tr> </tbody></table>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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
Back
Top