# How to add to cells and return the result inthe third cell in excel?

say, i have the following data

``````A  B  C
3  5
4  8
5  9
6  0
7  6
8  3
9  4
``````

How can i add two cells from each line and put the result in the cloumn C, the result should look like this..

``````A  B  C
3  5  8
4  8  12
5  9  14
6  0  6
7  6  13
8  3  11
9  4  13
``````

thank you

-

## migrated from stackoverflow.comNov 11 '11 at 10:55

This question came from our site for professional and enthusiast programmers.

SO is for programming questions - please clarify whether you need to do this programmatically, or are just stuck on how to use Excel. – Andrew Nov 11 '11 at 10:27
well, i'd like to do it using the function in MS Excel – Nok Imchen Nov 11 '11 at 10:29
ok. thanks.. :) – Nok Imchen Nov 11 '11 at 10:32

write: `=(A1 + B1)` in cell C1.
then select the cell, there's a little square in one of the corners, click it and drag down.

-
Thanks, it worked :) – Nok Imchen Nov 11 '11 at 10:42
select the C1 cell, it will put a "frame" around it, one of the corners has a little square, click it and drag down. this will apply the same formula for the rest of the cells. – yurib Nov 11 '11 at 10:42
Is there anyway to do that just by typing in the formula bar instead of dragging down? actully i've more than 10,000 cells in both A1 and B1, so dragging is kinda hard – Nok Imchen Nov 11 '11 at 10:48
double click the little square instead of dragging it. the formula will be copied down as far as your goes. – chris neilsen Nov 11 '11 at 11:51

In cell C1 (assuming that `3,5` line is row 1), enter `=a1+b1` and hit ENTER.

Then click in that cell, grab the bottom right corner of it and drag/extend it to the seventh row.

-
Thanks, it worked :) – Nok Imchen Nov 11 '11 at 10:38
Is there anyway to do that just by typing in the formula bar instead of dragging down? – Nok Imchen Nov 11 '11 at 10:49