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.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
crazy_hell_angel la Simpatie.ro
Femeie
25 ani
Gorj
cauta Barbat
25 - 53 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Paste Only Column Widths [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 787
If you need column widths from another sheet or document or table, you usually just:
- copy the desired columns
- select first cell in the first column of the desired table
- go to paste
- choose Keep Source Column Widths (W)

The problem with that is the fact that it also pastes the contents of the table.

If you don't want that you need extra steps:
- copy the desired columns
- select first cell in the first column of the desired table
- go to paste
- select Paste Special
- select Column Widths
- click OK or ENTER

With VBA you can do this in one click, of course. The only downside is that there is no undo, but that's the problem always with VBA in Excel.

- copy the desired columns
- select first cell in the first column of the desired table
- click the button in QAT that links the following code



Sub ColumnWidths_Paste()
    Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
End Sub


Source: Macro recorder


pus acum 6 ani
   
Pagini: 1  

Mergi la