Solved

Excel Macro is missing some strings.

Posted on 2011-09-10
6
275 Views
Last Modified: 2012-05-12
Hi Experts:

I have a macro attched fetching data from txt file, it works mostly fine except some issues:
After I checked manully the txt total of accounts is not matching;
1- Follwing accounts are missed I don't know why: account are
     [ 798026 - 798039 - 798020 - 798040 - 798016 - 798017 - 208028 ].
2- in some customers if there is FX line should be add to TOTAL FINANCED, the issue is macro missing that so    GRAND TOTAL becomes wrong.


Thanx.



<<byundt removed MatLab and VBScript Zones 9-10-11>>



Master-Filtering.xlsm
CBG-Aug--11.txt
0
Comment
Question by:obad62
  • 3
  • 3
6 Comments
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36516445
Your vba project is password protected - could you free it up and repost pls?
0
 

Author Comment

by:obad62
ID: 36517237
macro password :  pingo000
0
 

Author Comment

by:obad62
ID: 36518886
no-pass version
Master-Filtering.xlsm
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 17

Expert Comment

by:andrewssd3
ID: 36522062
Hi

The problem with the missing accounts is that the account name in each case began with a number, and the macro was only looking for alphabetic characters.  You can fix this by changing in clsOfficers the line the identifies the account as follows:
        'ElseIf TheLine Like "* ###### [A-Z]*" Then
        ' andrewssd3 replace this line
        ElseIf TheLine Like "* ###### [A-Z0-9]*" Then

Open in new window


The exception is 208028 which is missed because its account name is all blanks.  This is more difficult to pick up - can you confirm that you need it?

I don't understand exactly what you require with the FX line - there are two different sorts of FX lines in the file - can you please explain exactly what you need to identify, and which total they need to be added to?

Thanks

Stuart
0
 

Author Comment

by:obad62
ID: 36523302
Dear Stuart,

Many thanks for your reply.

1- Missing account is solved, 208028 issue i asked IT to add the name and worked fine.

2- FX , issue ,   Yes there are 2 types of FX and I need both of them to be checked by the macro
      ( FX Spot, FX forward ) if any or both is there macro will add it to TOTAL FINANCED.

Obad

0
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 36528069
Hi

I have made some changes to the clsOfficers Import code, which I've marked with my id as the previous people did.  I think this does what you want now.  

Stuart Master-Filtering.xlsm
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

746 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

13 Experts available now in Live!

Get 1:1 Help Now