Käynnissä

VBA loop code to sum

Hi,

I am looking for some VBA code to sum some data for me. I have attached an example file for you, with each months solution in column D. To explain what I need, I have a data set in Excel that contains dates in column A, a description for each date in column B, and an amount for each item in column C. I need the VBA code that sums the amounts, and provides the total for each 'Daily Amount' for each month, including the 'Monthly Amount' for the 1st day of the next month. To explain, I need it to sum all 'Daily Amounts' for January 2017 and include the 'Monthly Amount' on the 1st February 2017, which creates a total for January 2017. The February total would then be the sum all 'Daily Amounts' for February 2017 as well as the 'Monthly Amount' on the 1st March 2017, and so on.

The VBA code will need to have the following functionality:

- the VBA will need to be a loop, as the amount of rows could be very large

- sum only the amounts that have the description 'Daily Amount' and 'Monthly Amount', and ignore any other description amounts. I have included some extra data with the description 'Ignore this', this data should not be included in the sum

- there may be any number of 'Daily Amount' figures for each day, for example there may be 3 'Daily Amount' for the 20th of February

- there may be any number of 'Monthly Amount' figures for each day, for example there may be 3 'Daily Amount' for the 1st of February

- the number of dates each month will change each month, and wont be a set number of dates

- some months there may be no 'Monthly Amount' on the 1st to include (i.e. only 'Daily Amount' figures should be summed for this month)

- some months there may be no 'Daily Amount' figures, and only a 'Monthly Amount' figure

Can the sum of the 'Daily Amount' figures for each month, along the 'Monthly Amount' on the 1st of the following month, be provided in column E for each month please? For example, can the sum of the January 'Daily Amount' figures, and the 1st of February 'Monthly Amount' be listed in column E on the 1 Feb 2017 line, thank you

Kind Regards

Taidot: Excel, Visual Basic

Näytä lisää: vba sum results loop, code matlab vba, optimize code withselection vba, list loop vba, sum target value vba, sum multiple cells vba, sas code loop, sum cells sheets vba

About the Employer:
( 8 reviews ) Sydney, Australia

Projektin tunnus: #13162173

Myönnetty käyttäjälle:

30 $ AUD 1 päivässä
(12 arvostelua)
3.0

3 freelanceria on tarjonnut keskimäärin 30 $ tähän työhön

rajibspi7

I know what do you want and i have more skill about your project. So contact with me about your project done in time with your budget.

30 $ AUD 1 päivässä
(1 arvostelu)
0.5
donfoss6

We are highly experienced Post Graduate Engineers, Doctors, IT, ITES, Software, Infrastructure Professionals, Web Designers and IT Architects. We can redo, improve, and publish any engineering, scientific MATLAB, S Lisää

100 $ AUD 1 päivässä
(0 arvostelua)
0.0
30 $ AUD 1 päivässä
(0 arvostelua)
0.0
Harutyunvar

i have done similiar project and i understand what you need.

20 $ AUD 1 päivässä
(0 arvostelua)
0.0