Hi!
I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range
Set tbl = Tables(1)
'tbl = 10 rows and 6 columns
'I'm wondering how to say the following lines:
Set rng1 = tbl.Row 1 to 2, column 1 to 6
Set rng2 = tbl.Row 3 to 10 column 1 to 2
Set rng3 = tbl.Rows 3 to 10 column 3 to 6
Thanks!
Alex
--
Alex St-Pierre
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Geo
Hi! I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range Set tbl = Tables(1) 'tbl = 10 rows and 6 columns 'I'm wondering how to say the following lines: Set rng1 = tbl.Row 1 to 2, column 1 to 6 Set rng2 = tbl.Row 3 to 10 column 1 to 2 Set rng3 = tbl.Rows 3 to 10 column 3 to 6 Thanks! Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _ End:=tbl.Cell(2, 6).Range.End)
-- A+
Hi!
I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range
Set tbl = Tables(1)
'tbl = 10 rows and 6 columns
'I'm wondering how to say the following lines:
Set rng1 = tbl.Row 1 to 2, column 1 to 6
Set rng2 = tbl.Row 3 to 10 column 1 to 2
Set rng3 = tbl.Rows 3 to 10 column 3 to 6
Thanks!
Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _
End:=tbl.Cell(2, 6).Range.End)
Hi! I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range Set tbl = Tables(1) 'tbl = 10 rows and 6 columns 'I'm wondering how to say the following lines: Set rng1 = tbl.Row 1 to 2, column 1 to 6 Set rng2 = tbl.Row 3 to 10 column 1 to 2 Set rng3 = tbl.Rows 3 to 10 column 3 to 6 Thanks! Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _ End:=tbl.Cell(2, 6).Range.End)
-- A+
Alex St-Pierre
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans la section anglaise.
Est-ce que tu sais comment on peut dire : Set rng1 = tbl.Row 3 et 5 seulement 'sommation de somme ex:rng1 = rng1 + nouveau range
Je me pose ces questions pour optimiser la vitesse de calcul des tableaux.. Au lieu de travailler cellule par cellule, je vais choisir les cellules à modifier pour ensuite appliquer le nouveau format.
Merci! Alex
-- Alex St-Pierre
"Geo" wrote:
Hi! I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range Set tbl = Tables(1) 'tbl = 10 rows and 6 columns 'I'm wondering how to say the following lines: Set rng1 = tbl.Row 1 to 2, column 1 to 6 Set rng2 = tbl.Row 3 to 10 column 1 to 2 Set rng3 = tbl.Rows 3 to 10 column 3 to 6 Thanks! Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _ End:=tbl.Cell(2, 6).Range.End)
-- A+
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans
la section anglaise.
Est-ce que tu sais comment on peut dire :
Set rng1 = tbl.Row 3 et 5 seulement
'sommation de somme ex:rng1 = rng1 + nouveau range
Je me pose ces questions pour optimiser la vitesse de calcul des tableaux..
Au lieu de travailler cellule par cellule, je vais choisir les cellules à
modifier pour ensuite appliquer le nouveau format.
Merci!
Alex
--
Alex St-Pierre
"Geo" wrote:
Hi!
I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range
Set tbl = Tables(1)
'tbl = 10 rows and 6 columns
'I'm wondering how to say the following lines:
Set rng1 = tbl.Row 1 to 2, column 1 to 6
Set rng2 = tbl.Row 3 to 10 column 1 to 2
Set rng3 = tbl.Rows 3 to 10 column 3 to 6
Thanks!
Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _
End:=tbl.Cell(2, 6).Range.End)
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans la section anglaise.
Est-ce que tu sais comment on peut dire : Set rng1 = tbl.Row 3 et 5 seulement 'sommation de somme ex:rng1 = rng1 + nouveau range
Je me pose ces questions pour optimiser la vitesse de calcul des tableaux.. Au lieu de travailler cellule par cellule, je vais choisir les cellules à modifier pour ensuite appliquer le nouveau format.
Merci! Alex
-- Alex St-Pierre
"Geo" wrote:
Hi! I'm wondering how to define a range inside a table.
Dim tbl as Table, rng1 as Range, rng2 as Range, rng3 as Range Set tbl = Tables(1) 'tbl = 10 rows and 6 columns 'I'm wondering how to say the following lines: Set rng1 = tbl.Row 1 to 2, column 1 to 6 Set rng2 = tbl.Row 3 to 10 column 1 to 2 Set rng3 = tbl.Rows 3 to 10 column 3 to 6 Thanks! Alex
Par exemple :
Set rng1 = .Range(Start:=tbl.Cell(1, 1).Range.Start, _ End:=tbl.Cell(2, 6).Range.End)
-- A+
Geo
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans la section anglaise.
Pas grave, c'est la faute à l'interface Que vous utilisez, avec un lecteur de news, vous n'auriez sans doute pas fait cette confusion.
Est-ce que tu sais comment on peut dire : Set rng1 = tbl.Row 3 et 5 seulement 'sommation de somme ex:rng1 = rng1 + nouveau range
Ce serait contraire à la définition : "Un objet Range fait référence à une zone contiguë d'un document." Selon ce que vous voulez faire une solution serait d'affecter un signet à chaque sous-range, mais ça fait toujours deux traitements séparés.
-- A+
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans
la section anglaise.
Pas grave, c'est la faute à l'interface Que vous utilisez, avec un
lecteur de news, vous n'auriez sans doute pas fait cette confusion.
Est-ce que tu sais comment on peut dire :
Set rng1 = tbl.Row 3 et 5 seulement
'sommation de somme ex:rng1 = rng1 + nouveau range
Ce serait contraire à la définition :
"Un objet Range fait référence à une zone contiguë d'un document."
Selon ce que vous voulez faire une solution serait d'affecter un signet
à chaque sous-range, mais ça fait toujours deux traitements séparés.
Merci bcp Geo, désolé pour la question anglaise, je croyais que j'étais dans la section anglaise.
Pas grave, c'est la faute à l'interface Que vous utilisez, avec un lecteur de news, vous n'auriez sans doute pas fait cette confusion.
Est-ce que tu sais comment on peut dire : Set rng1 = tbl.Row 3 et 5 seulement 'sommation de somme ex:rng1 = rng1 + nouveau range
Ce serait contraire à la définition : "Un objet Range fait référence à une zone contiguë d'un document." Selon ce que vous voulez faire une solution serait d'affecter un signet à chaque sous-range, mais ça fait toujours deux traitements séparés.