Inserting a forumla to entire row

MR3

Board Regular
Joined
Jun 10, 2008
Messages
175
How does one insert a formula and apply it to an entire column, say column C.

=sum(A1+B1)
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How does one insert a formula and apply it to an entire column, say column C.

=sum(A1+B1)
If you wnat to get the sum of every cell in column C:

=SUM(C:C)

You can put that formula anywhere *EXCEPT* in column C.
 
Upvote 0
i know that but i want to insert it in my vba macro.
so then it takes =sum but of the total number of used rows.

so for example, if i run a count and then i know that my worksheet has 13 used rows now in my macro i want it to apply =sum(b1) all the way down to =sum(b13) something along those lines
 
Upvote 0
If your using a macro why not build in Ctrl+Shift+DownArrow as this will always take you to the last cell with data.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top