Creating a Table

The data in Figure 6-1 can be easily converted to a Table. Select a cell in the data and select the Insert tab of the Ribbon. Click the Table button in the Tables group to show the dialog box in Figure 6-3.

Figure 6-3

The resulting table is shown in Figure 6-4. It has been assigned the name Table1 by default. You can change this to something more meaningful in the Properties group on the Table Tools Design tab of the Ribbon.

If you record the creation of the table, you will get code like the following:

ActiveSheet.ListObjects.Add(xlSrcRange, Range("$B$3:$D$9"), , xlYes).Name = _ "Tablel"

Converting a range to a table creates a ListObject object. This is the same object introduced in Excel 2003, where the table is called a list. Excel 2007 supports a number of new properties for the ListObject object, mainly concerned with the table's appearance.

Tables provide you with a way of formally identifying a data structure, and Excel provides tools and intelligence to help manage the data and its formatting. Tables also allow you to link to external data. See Chapter 21 for information on using ListObject objects to link to external data.

Tut

, à«'

■ T

Qaiatjstxlsm -

Microsoft Bice!

Table Tools

- — c

Ftemé

insert Page lay cut FoFmutss Data Review

VveM

Pevelcpef Design

® a HC

le Name: Bur

Ftmsrize with Pivot nave Duplicates Tvert to Range

Ä» Uni»

erttes r> in B»owser nt is

/ Header Row First Column IH Total Row lr_! Last Column V Banded Rows Banded Columns

BBSBO S^DSS -

Ta Wei J»' Rer

:: ;

■a

Resize Table -£]

-

PiDpertles

Tools

External Tafcle D

Table Style Option'.

Table Styles

B3 »

J& Name

1*

A

£

C D

E

F

G

H

1 j

K

L

M

N ' O ' W

1

2

3

H:.K1- SS '

4

Glenda

IB

F

5

Helena

2?

F

6

Mary

IB

t

7

John

21

M

S

Henri

19

M

s

Jack

ia

M

I

10

11

12

13

M

► 1" Sheetl Sheets 5heeO

— iiiti.

1' _ « ' fc 1 1

Ready . ¡5]

Average; 19 Count-2L Sum; 114 J®'010 ±00^ j'^/

Figure 6-4

0 0

Post a comment