# Conditional Formatting Formula

#### Beckie_001

##### New Member
Hi

I have hundreds of columns with a value from the list below. I want to highlight all the cells that end in 'E' red, 'D' green and 'S' purple. I was wondering if there was a formula for this to save me having to write 21 rules?
 0 to 11 Months - E 0 to 11 Months - D 0 to 11 Months - S 8 to 20 Months - E 8 to 20 Months - D 8 to 20 Months - S 16 to 26 Months - E 16 to 26 Months - D 16 to 26 Months - S 22 to 36 Months - E 22 to 36 Months - D 22 to 36 Months - S 30 to 50 Months - E 30 to 50 Months - D 30 to 50 Months - S 40 to 60 Months - E 40 to 60 Months - D 40 to 60 Months - S ELG - E ELG - D ELG - S Thanks Beckie

<colgroup><col style="width: 98pt; mso-width-source: userset; mso-width-alt: 4754;" width="130"> <tbody>
</tbody>

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.
for the red conditional formatting:
=RIGHT(TRIM(A1),1)="E"

for the green conditional formatting:
=RIGHT(TRIM(A1),1)="D"

for the purple conditional formatting:
=RIGHT(TRIM(A1),1)="S"

Replies
2
Views
484
Replies
3
Views
245
Replies
3
Views
262
Replies
4
Views
276
Replies
11
Views
993

1,221,213
Messages
6,158,565
Members
451,498
Latest member
tyshanklin1

### 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.

### Which adblocker are you using?

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

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