?
Solved

help in calculate!!!

Posted on 2001-06-09
6
Medium Priority
?
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 17

Accepted Solution

by:
Suat Ozgur earned 200 total points
ID: 6170425
deposit = 1000
For i = 1 To 102
    profit = deposit * 0.05 / 12
    deposit = deposit + profit
Next i
0
 
LVL 17

Expert Comment

by:Suat Ozgur
ID: 6170428
above one would give you cumulative result value using 0.05 / 12 for monthly interest.

suat
0
 
LVL 3

Expert Comment

by:Hornet241
ID: 6170446

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:VK
ID: 6176831
Why not

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

Expert Comment

by:DanRollins
ID: 7133478
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
ID: 7167891
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month11 days, 19 hours left to enroll

752 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