VBA - sum a column based on date
up vote
-3
down vote
favorite
I'm looking to use a VBA to sum a specified column in my workbook based on the date listed in column A. So, for example if the date in column A is 05/09/2018, it will provide a sum total of the values recorded in column L on that date and put that sum total figure in a cell in column M. I've attached a screenshot of my table columns below, any help would be appreciated as I am still learning VBA. Thank you!
excel vba
|
show 2 more comments
up vote
-3
down vote
favorite
I'm looking to use a VBA to sum a specified column in my workbook based on the date listed in column A. So, for example if the date in column A is 05/09/2018, it will provide a sum total of the values recorded in column L on that date and put that sum total figure in a cell in column M. I've attached a screenshot of my table columns below, any help would be appreciated as I am still learning VBA. Thank you!
excel vba
2
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
1
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday
|
show 2 more comments
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
I'm looking to use a VBA to sum a specified column in my workbook based on the date listed in column A. So, for example if the date in column A is 05/09/2018, it will provide a sum total of the values recorded in column L on that date and put that sum total figure in a cell in column M. I've attached a screenshot of my table columns below, any help would be appreciated as I am still learning VBA. Thank you!
excel vba
I'm looking to use a VBA to sum a specified column in my workbook based on the date listed in column A. So, for example if the date in column A is 05/09/2018, it will provide a sum total of the values recorded in column L on that date and put that sum total figure in a cell in column M. I've attached a screenshot of my table columns below, any help would be appreciated as I am still learning VBA. Thank you!
excel vba
excel vba
edited yesterday
Cindy Meister
12.9k101934
12.9k101934
asked yesterday
NHure92
376
376
2
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
1
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday
|
show 2 more comments
2
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
1
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday
2
2
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
1
1
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53222158%2fvba-sum-a-column-based-on-date%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Why do you want to do it using vba? You can use SUMIF function to do that.
– Pavel_V
yesterday
Hi, i understand it would be fairly simple to do using a SUMIF however the team i am working on this workbook with have suggested having that process automated.
– NHure92
yesterday
1
The sumif equivalent exists in vba, but why complicate with vba - if someone turns off macros then it will stop working....
– Solar Mike
yesterday
I am not sure what kind of automation you think can be achieved via vba in this that cant be done using the SUMIF function. If you setup the function it will "automatically" calculate the result if you change the input cells. In VBA you can either create UDF to handle this which will do totally the same thing or you can create a macro that needs to be either manually run or run based on some event/trigger, which is kind of equally or less automatic than a function.
– Pavel_V
yesterday
Possible duplicate of Error when using SUMIFS from different worksheet
– OwlsSleeping
yesterday