Forum Discussion
Font size in a drop down list
Hi all; the original poster asked for a solution to changing the font size in a data-validated Excel drop-down list. All of the answers I've seen change the zoom of the entire sheet using ActiveWindow.Zoom = xxx, which is (in my case) not usable - although it might be fine for the original poster. Can anyone point to a solution for changing the *font size* in the list, or changing the zoom *of the cell*, not the entire worksheet ? VBA solutions would be fine... I have tried to apply this same method to change the cell itself when selected (or rather, when the data-validated drop-down is selected), and I've not been successful.
NikolinoDE- you said that " the font size of a drop-down list can only be changed using VBA". I'm happy to try that - can you elaborate on how to change the font size, not the worksheet zoom, please?
Appreciate any help or references. Thanks ! Mal.
It's still not clear to me what you want to do, since the translation isn't very helpful to me.
Do you want the cell text to adjust?
If so, then it would have to be clarified whether it should be with line breaks or simply adapt the text to the cell size (no matter how small the text could be).
With "Format Cells..." you can just select the cell and fit the text to fit the cell size (without changing row and column) or set the text to wrap text if you want the cell width to stay the same.
Here are the steps:
1. Highlight the cells you want to format.
2. Invoke the "Format Cells..." command. You can do this in all Excel versions using the key combination CTRL + 1.
3. In the dialog box that appears, activate the "Alignment" tab.
4. Click the "Fit to cell size" option.
With this option you optimize the font size for the cell width
5. Confirm your definition with the OK button.
or with VBA Code, only here automatically changes with the cell, the whole row and column.
Sub SetColumnsRows()
With ActiveSheet.UsedRange
.Columns.AutoFit
.Rows.AutoFit
End With
end sub
Hope I could help you with this.