Solved

help in calculate!!!

Posted on 2001-06-09
6
160 Views
Last Modified: 2010-05-02
hi,
I want to calculate the following
'calc profit for first month'
profit = deposit * .05/12
'accumlate profit
deposit = deposit + profit
I want loop to do what mentioned above
I was start with constant 1000 for period of 102 month
I used for I, and try do while but the result gives me the first month only
please urgent help...
DO LOOP
PROFIT = DEPOSIT * .05/12
DEPOSIT = DEPOSIT + PROFIT
LOOP
HOW can I do it with vb plz...
0
Comment
Question by:diaa
6 Comments
 
LVL 17

Accepted Solution

by:
smozgur earned 50 total points
Comment Utility
deposit = 1000
For i = 1 To 102
    profit = deposit * 0.05 / 12
    deposit = deposit + profit
Next i
0
 
LVL 17

Expert Comment

by:smozgur
Comment Utility
above one would give you cumulative result value using 0.05 / 12 for monthly interest.

suat
0
 
LVL 3

Expert Comment

by:Hornet241
Comment Utility

Here's how to do it in a Do..Loop

Total = 102
Curr = 1
Deposit = 1000
do while Total >= Curr
    Deposit = Deposit + (Deposit * .05 / 12)
    Curr = Curr + 1
loop

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Expert Comment

by:VK
Comment Utility
Why not

Deposit = Deposit *(1+(0.05/12))^102
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi diaa,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept smozgur's comment(s) as an answer.

diaa, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now