Np. w celu zmiany formatowania, patrz użycie Union:
'Thanks: https://quorum.akademiq.pl/discussion/comment/7324#Comment_7324
Dim oListObj As ListObject
Set oListObj = Worksheets("Oferta").ListObjects("Table3") 'change the sheet and table names accordingly
Dim k1 As Range
Dim k3 As Range
Dim k5 As Range
Dim kom As Range
Set k1 = oListObj.ListColumns("Cena netto").DataBodyRange
Set k3 = oListObj.ListColumns("Cena brutto").DataBodyRange
Set k5 = oListObj.("Tabela1").ListColumns("Wartość Netto").DataBodyRange
For Each kom In Union(k1, k3, k5)
Debug.Print kom.Address
Next
End Sub
Jeżeli przylegają do siebie
Dim cell As Range
For Each cell In oListObj.ListColumns("Cena netto").DataBodyRange.Resize(, 4)
Brak komentarzy:
Prześlij komentarz