Automatically formating a reference cell?

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
954
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

In my worksheet, cell B1 I have the formula "=A1." I would like B1 to also automatically contain the same formats as cell A1. I need the bold format to automatically appear in B1 as my data is being entered into A1. Is this possible?

Thanks in advance for any help!


-twg
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You will need code to do this, Is it just A1/B1 or a larger range of cells?
 
Upvote 0
You will need code to do this, Is it just A1/B1 or a larger range of cells?

the master list is "INPUT!A5:A317"

the cells where the code needs to be are: DETAIL1!A5:A317"



is that enough info?
 
Upvote 0
Untested but right click the INPUT tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5:A17")) Is Nothing Then Exit Sub
With Target
    .Copy
    Sheets("DETAIL").Range(.Address).PasteSpecial Paste:=xlPasteValues
    Sheets("DETAIL").Range(.Address).PasteSpecial Paste:=xlPasteFormats
End With
End Sub
 
Upvote 0
Untested but right click the INPUT tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5:A17")) Is Nothing Then Exit Sub
With Target
    .Copy
    Sheets("DETAIL").Range(.Address).PasteSpecial Paste:=xlPasteValues
    Sheets("DETAIL").Range(.Address).PasteSpecial Paste:=xlPasteFormats
End With
End Sub

thank you. do i need a button to execute this?
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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