excel vba

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel VBA

Excel VBA

resolvedResolved · High Priority · Version 2010

Diana has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Excel VBA

HI,

I am stuck with a problem, hope you can help me.
I need to create front sheet where I will keep total nomination volumes from different companies and I need to create a marco that will take this total volume and upload it in the cells in sheet 2 but there value needs to be divided by numbers of days in any given month. I am a little stuck on what is the best solution is for this.

many thanks
Diana

RE: Excel VBA

Hi Diana,


Thank you for the forum question.

I have created a dummy workbook where I have done the coding.


Please have a look at the attached workbook and tell me if it make sense.






Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Attached files...

divideNumberOfDaysInMonth.xlsm

RE: Excel VBA

HI Jens,

thank you for your response. unfortunately couldn't see any coding, just some data in the spread sheet.
front sheet data looks similar to what I had in mind, destination however, I would use columns B and onwards as counterparties and use rows in column A to have dates ( 1st-31Jan for example) and for A LTD daily volume would be 67390.26 ( total volume/31 days)

hope that helps

many thanks

Diana

RE: Excel VBA

Hi Diana,

I hope that I understand what you want.

I have amended the code in the attached workbook.

Please open the workbook. Have a look at the sheet destination. Then open the visual basic editor and execute the code.





Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Attached files...

divideNumberOfDaysInMonth.xlsm

RE: Excel VBA

Hi Diana,

The code in module 2 is just some tests I did. The code in module 1 is the code to do the job.


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Mon 1 Feb 2016: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Calculate difference between two times

For presenting the result in the standard time format (hours : minutes : seconds . Use the subtraction operator (-) to find the difference between times, and the TEXT function to format the returned value to text in a specific number format.

Hours never exceed 24, minutes never exceed 60, and seconds never exceed 60.

=TEXT(B2-A2,"h")
Hours between two times (4)

=TEXT(B2-A2,"h:mm")
Hours and minutes between two times (4:55)

=TEXT(B2-A2,"h:mm:ss")
Hours and seconds between two times (4:55:00)

Where B2 and A2 must hold the end time and start time respectively formatted as a time format

View all Excel hints and tips


Server loaded in 0.05 secs.