Simple question - probably hard to do? - Copy font size to different cell ?

Ishalez

New Member
Joined
Jul 5, 2015
Messages
25
I'm expecting this to be difficult, though it's just a very simple thing :)

I have a cell, let's call it A1 that a value it put in.

There are then other cells which are simply mirror copies of this.

Let's say, just as examples: B2, D5, E6 and F9

These other cells, simply have =A1 in them. So I change the text in A1 and all these other cells change to match.

My question (and what I'd like to happen) is this:
I highlight the main cell A1 and I change to font size from, lets say 11 to 8

I'd then like cells, B2, D5, E6 and F9 to all change to the same font size as A1 automatically.

Simple yes :)
But I'm guessing hard to make happen? :(

Thanks for reading.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
So will the original cell always be A1 ??

If the cell mirrors the other cells I suggest this:

If you have Cake in all the other cells

And you enter cake into A1 A Vba script could change the font size in all those other cells

Would this work?
 
Upvote 0
So will the original cell always be A1 ??

If the cell mirrors the other cells I suggest this:

If you have Cake in all the other cells

And you enter cake into A1 A Vba script could change the font size in all those other cells

Would this work?

Thank you for the reply.
Yes, the original cell would always be the same one.

So it would need a script that would automatically detect when I changed the font size in A1 and duplicate this change into the other cells?
 
Upvote 0
No.

My script would run when you enter Cake for example into A1
And if A1 font size was 26 all the other cells with cake would be changed to font size 26

Here try this:

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
'Modified  12/8/2018  1:13:07 PM  EST
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim r As Range
For Each r In ActiveSheet.UsedRange
    If r.Value = Target.Value Then r.Font.Size = Target.Font.Size
Next
End If
Application.ScreenUpdating = True
End Sub
 
Upvote 0
I know of no way for a script to automatically run when you change the font size.

And how would the script know what other cells to change the font size to.
 
Upvote 0
But if you have
=A1 in all these cells and A1 has cake entered then my script would work if you just had =A1

In those cells.

So Yes just enter =A1 in all the cells you want.

Set the font size to what you want in A1 and then enter some value like cake or Apple and my script will do what you want.
 
Upvote 0
If you do not want to change the value in A1 then Just double click on A1 and use this script
Install as previously mentioned.

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.ScreenUpdating = False
'Modified  12/8/2018  1:43:14 PM  EST
If Not Intersect(Target, Range("A1")) Is Nothing Then
Cancel = True
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim r As Range
For Each r In ActiveSheet.UsedRange
    If r.Value = Target.Value Then r.Font.Size = Target.Font.Size
Next
End If
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Thank you so much.
I'll try that, and hopefully it will work great.
Amazing work, thank you again for spending the time to help me.
Much appreciated :)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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