Prevent changing font using drag

KentBurel

Board Regular
Joined
Mar 27, 2020
Messages
68
Office Version
  1. 2019
Platform
  1. Windows
I have a spreadsheet, a portion of which looks like this:
1588862558626.png

Columns MNO are all in the Wingdings font. Column P is regular ole Calibri. All the cells in column P have a validation formula that the values can only be 0 or ?. The sheet is protected. As you see Format Cells is greyed out. But you see the first row in column P has been changed to the Wingdings font. This happened when the user select the cell in O4 and dragged it to P4. How do I prevent the font in column P from being changed?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Is it OK to have macro's in the workbook?

In the code for this sheet you can check for changes to column P and then set the font for P to Calibri.
To do this, right click on the sheet tab and select View code... The VBA editor will open

Then paste the following code in the window that opens:
VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Columns("P")) Is Nothing Then
        Columns("P").Font.Name = "calibri"
        
    End If
End Sub
Close the VBA editor.
Now save the workbook as .xlsm (macro enabled)

Then copy something across from O and you will see the font in P changes back to calibri
 
Upvote 0
I may misunderstand your question, if so sorry.
Each font has a different size. When you change font you will ALWAYS change the size needed for the text, so it may get bigger or smaller, or be cut off or flow to a new line, according to the app you are using and the settings.

Are you hoping that Photoshop will change the font and adjust the size so it is the same width on screen? That's just not what happens.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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