copying a cell's formatting to another based on cell value

broadarmel

New Member
Joined
Jun 23, 2011
Messages
4
Hello,
Is there a way to copy the formatting of a cell from one table to a second table based on the cell value?

Thanks!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Code:
[COLOR="Blue"]Sub[/COLOR] CopyBasedOnCellValue()
    [COLOR="Blue"]If[/COLOR] Sheets(1).Range("A1") > 10 [COLOR="Blue"]Then[/COLOR]
        Sheets(1).Range("A1").Copy
        Sheets(2).Range("A1").PasteSpecial xlPasteFormats
    [COLOR="Blue"]End[/COLOR] [COLOR="Blue"]If[/COLOR]
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]Sub[/COLOR]
 
Upvote 0
I do not believe conditional formatting works for this.

To explain further-

Array 1: contains various color coded cost centers (ie. 00001) with total hours billed against them
Array 2: contains forecasted hours by project billed against the cost centers

When I input a new project into Array 2, I'd like the formatting to be updated automatically based on the cost center's formatting in Array 1.

To me it seems like there would need to be some sort of VLOOKUP against Array 1 to copy the formatting to Array 2, but I'm not a super excel user and do not know how to copy formatting with VLOOKUP or if it's possible.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,219
Members
452,895
Latest member
BILLING GUY

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