If C2 > E2, copy cell H2 formatting

brlattim

New Member
Joined
Jul 17, 2013
Messages
21
I have a list. I want to copy a cells formatting if one cell is greater than the other. Is there anyway to do this? I tried conditional formatting, but the problem is I only want to change fill and text color. Some rows have different decimal requirements so conditional formatting (format painter) isn't working. I have tried conditional formatting, but it copies the entire format and not just the cell fill and text color that was part of the format rule. Can anyone help losing my mind over here :-)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Any post about copying that does not contain very specific information about where to copy from and where to paste to is difficult to answer.
If C2 > E2, copy cell H2 formatting

Copy to where, exactly?
 
Upvote 0
So a VBA macro can probably do what you want, if VBA is something you are willing to include in the workbook. But before that you should probably consider what you want to happen if the condition is not met. Right now, you have stated the requirement that if C2 > E2, then copy cell H2 formatting to C2. But what happens if C2 <= E2? Do you leave the C2 formatting as is, or revert to something else?
An example: say that C2 > E2 and so running the macro changes the formatting to be the same as H2. Then 10 minutes from now you change the value of C2 so that it is LESS than E2. The format of C2 is already copied from H2. Do you want to leave it that way or change back to some other formatting?
 
Upvote 0

Forum statistics

Threads
1,224,804
Messages
6,181,061
Members
453,017
Latest member
rlundbulls23

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