Working With Cells

K\1

ra

XLPASTETYPE CONSTANT

DESCRIPTION

xlPasteAll

Default value. Pastes the entire contents of the cells.

xlPasteAllExceptBorders

Pastes everything but border settings.

xlPasteColumnWidths

Only sets the column widths to match.

xlPasteComments

Only pastes the cell comments.

xlPasteFormats

Only sets the cell formatting options.

xlPasteFormulas

Only pastes the formulas.

xlPasteFormulasAndNumberFormats

Pastes the formulas and number formats.

xlPasteValidation

Sets the cell validation.

xlPasteValues

Only pastes the cell values.

xlPasteValuesAndNumberFormats

Pastes the cell values and number formats.

a

Filin Edit " Vie

Insert Forn

at Tools Dat

Windotv

elp

Type a question for hei

*

¡D^Sâîl # û v*

X fe | « -

& E * êi

im

3

»

» 10 . B I U

Ifl mm hi

G3

f* 406700

A

B

c

D

E

F

G

H

I —

1

Sales Totals

2

January

February

March

April

May

June

Atlanta

$55,000.00

$100,000.00

$187,000.00

$252

700.00

$351

700.0Q

$406,700.00

4

Boise

$45,000.00

$132,000.00

$187,000.00

$274

DOO.OO

$377

DOO.OO

$422,000.00 $396,000.00

5

Dallas

$98,000.00

$153,000.00

$198,000.00

$253

DOO.OO

$298

DOO.OO

6

Denver

$87,000.00

$152,700.00

$251,700.00

$329

200.00

$394

900.0Q

$482,900.00

7

Ft. Worth

$65,700.00

$163,700.00

$204,700.00

$249

700.00

$347

700.00

$450,700.00

fi

Houston

$99,000.00

$187,000.00

$252,700.00

$351

700.00

$406

700.00

$472,400.00

9

Las Vegas

$88,000.00

$187,000.00

$285,000.00

$330

000.00

$371

000.00

$458,000.00

10

Little Rock

$41,000.00

$139,900.00

$192,900.00

$277

400.00

$356

900.00

$457,800.00

11

Los Angeles

$103,000.00

$201,000.00

$289,000.00

$330

DOO.OO

$417

DOO.OO

$470,000.00

12

Miami

$98,900.00

$201.900.00

$256,900.00

$338

400.00

$426

400.0Q

$481.400.00

13

Salt Lake

$53,000.00

$118,700.00

$196,200.00

$294

200.00

$370

700.00

$419,700.00

14

San Antonio

$81,500.00

$122,500.00

$221,400.00

$274

400.00

$351

900.00

$450,900.00

15

Seattle

$77,500.00

$176.500.00

$258,000.00

$323

700.00

$376

700.00

$474.700.00 $557,900.00

16

St. Louis

$84,500.00

$172,500.00

$271,500.00

$356

DOO.OO

$454^900.00,

1/'

18

19

20

21

22

23

V4

25

26

Z-

> M \ 5heet6

/5heet5 \Shee

1 / Sheet2 / Sh

eet4 / Sheet3

hl

• r

Select destination and press ENTER or choose Paste

Sum=$6,401,100,00

^Q Type Range(Cells(3, N + 1), Cells(l6, N + 1)).PasteSpecial, replacing Cells(3, N + 1), Cells(16, N + 1) with the range where the copied cell values should be pasted.

0 Type Operation:=xlPaste SpecialOperationAdd.

Type Next.

□ Switch to Excel and run the macro.

■ The specified range of cells is copied and added to the new range of cells.

0 0

Post a comment