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:
AlessyaDaniela la Simpatie.ro
Femeie
24 ani
Bucuresti
cauta Barbat
25 - 50 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Resize Table in ActiveSheet Based on Value in Cell Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 787
The following code resizes the Table in the active sheet by the value I add in cell D1:


Sub Tbl_Resize()

Dim tbl As ListObject
Dim lr As Long

Set tbl = ActiveSheet.ListObjects(1) '"Table1"
    lr = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
   
If IsNumeric(Range("D1").Value) Then
    lr = lr + Range("D1").Value
Else
    MsgBox "The value inserted in cell D1 is not a number"
    Exit Sub
End If

tbl.Resize Range("$A$5:$L$" & lr)

End Sub


pus acum 1 an
   
Pagini: 1  

Mergi la