Solved

complex question

Posted on 2002-05-14
8
142 Views
Last Modified: 2010-05-02
I have "transaction file.txt" that contains cust id, trans type(W=withdrawal,i=interest, d=deposit), and amount of transaction , here is the sample:
(this file must be read line by line)
123
D
20
123
W
10
123
i
40
124
D
40
124
W
20

I also have old master file in excel, contains cust id, name and current balance, here is the sample:

cust id  name   curr balance
123      john     500
124      marry    600

what i want is to have the updated master file after being processed with transaction file (new balance=curr balance + deposit + interest - withdrawal). The code must be done in MS Excel

0
Comment
Question by:xaveboyz
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7010512
Do you have any code for this or do you expect it to be done for you? If you have a specific problem then we would be happy to help but this site is not here to get your work/homework done for you!
0
 

Author Comment

by:xaveboyz
ID: 7010950
this is not my homework
0
 
LVL 45

Accepted Solution

by:
aikimark earned 75 total points
ID: 7010994
Example:
Note -- verify all syntax with online help.

filenum = freefile
open transactionfile for input as #filenum
do
 line input #filenum, acct
 line input #filenum, action
 line input #filenum, amt
 activesheet.find "acct"
 select case action
   case "D", "I"
      activesheet.activecell = activesheet.activecell + amt
   case "W"
      activesheet.activecell = activesheet.activecell - amt
 end select
loop until eof(#filenum)
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:xaveboyz
ID: 7011043
i've found the answer
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7011128
If you found the answer, please post it here rather than delete the question. It may be valuable for other users. You can always have a moderator reduce the points on this question to zero so you don't lose out by it. Just post a zero point question in http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt with the URL of this question. Obviously you have to post your solution first.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7765534
Hi xaveboyz,
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 ask a Community Support Moderator to:

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

xaveboyz, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

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

Author Comment

by:xaveboyz
ID: 7765692
sory about the late....you've answered my question
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7766407
glad I helped.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

830 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