excel macro

dsp1899

New Member
Joined
Nov 17, 2003
Messages
5
i have three seperate cells A1, B1, and C1.
I need a macro to add B1 and C1 then transfer it to A1.
This needs to happen on a certain date in the month.
If anyone can help i would greatly appreciate it.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

For the first part, you can use something like this:
Code:
Sub AddMe()
    Sheets("Sheet1").Range("A1") = Range("B1").Value + Range("C1").Value
End Sub
What is the criteria for the date that this needs to happen? First Monday, specific date, etc. And what date format are you using?

Hope that helps,

Smitty
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
From a PM:
The date need to be the first monday of every month. I am not sure on the format of the date. This can be what ever.

As for the subscript out of range error, you actually need to have a "Sheet 1" with my example. Change the code reference to Sheet 1 to whatever the sheet in question is.

Hope that helps,

Smitty
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,161
Messages
5,768,547
Members
425,481
Latest member
ihumanl

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
Top