Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
karina22 Profile
Femeie
25 ani
Bucuresti
cauta Barbat
25 - 54 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Center Across Selection Keyboard Shortcut + Alternatives

Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 960
I think that Center Across Selection is a great feature as an alternative to merge and center. I'm not a fan of merging in Excel.

It's annoying to keep having to do it manually.

A keyboard shortcut you can use without a macro is: Ctrl + 1, Tab, C, C, Enter, Enter
An even longer/hilarious one posted by someone on reddit: Alt + H, ZA, FA, A, Tab, C, C, Enter, Enter

The fastest way however, is to use a macro in your QAT, for example using Alt + 1 if you add a button in the first position to the left of the QAT.
For the VBA code Center Across Selection, simply record the action to VBA, save the snippet in your PERSONAL.XLSB file, and add a button to QAT to use in every Excel file.

Here's the code:

Sub CAS()
    With Selection
        .HorizontalAlignment = xlCenterAcrossSelection
    End With
End Sub

Or you can even make a toggle-like button:

Sub CAS_toggle()
    With Selection
        If .HorizontalAlignment = xlCenterAcrossSelection Then
            .HorizontalAlignment = xlLeft
        Else
            .HorizontalAlignment = xlCenterAcrossSelection
        End If
    End With
End Sub



Source and more info and links:
https://www.reddit.com/r/excel/comments ... or_center/


 
   
Pagini: 1  
Mergi la