VBA Changing interior color based on value of another cell in same row

sunilkaru

New Member
Joined
Oct 22, 2019
Messages
1
Dear All

i have a data base and i need to change back ground color of a cell based on value of another cell in the same row. for an example, how to change color of A1 , if C1 got a date value (only type of value)? other types are email and blank. so I need to change 3 different colors?

A1B1C1
PO20054G02073521-Oct-19

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to the MrExcel board!

Do you really need VBA? Could you just use Conditional formatting like this?

Excel Workbook
ABC
1PO20054G02073521-Oct-19
2PO20055G020736
3PO20056G020737abc@def.com
4PO20057G02073824-Oct-19
CF Date Blank Email
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =FIND("@",C1)Abc
A12. / Formula is =C1=""Abc
A13. / Formula is =AND(C1<>"",ISERROR(FIND("@",C1)))Abc
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,520
Members
448,968
Latest member
Ajax40

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