PDA

View Full Version : chk and paste the range



Shane
05-03-2007, 06:41 AM
I have a worksheet That contains some bank account data (sheet1). I want to convert that data in the format which is available in Sheet2 of the same workbook.
On basis of account number and statement date we have to start searching the records and search upto either "bank reference" or "Total Count".
if the total transaction is "0" then we have to cut value of total transactions and net amt and paste it to sheet 2. If it found bank reference first then check all below records for that account number till it finds total count again. Copy and paste those records in sheet2..
Pls see sheet2 for sample output..

I need vba code for the same pls assit.

Pls assist

Oorang
05-11-2007, 07:01 AM
rofl Before you kill your self or anyone else trying to parse that godawful mess have you tried the following:
1.) Shooting whoever made sheet1 and replacing them with someone who knows how to do their job?
2.) Shooting whoever made sheet1 and replacing them with someone who understands 1st normal form.
3.) Seeing if your IT dept will spring for Datawatch Monarch.

Seriously though, take it from someone who knows. The problem with writing parsers is that if they change anything even the smallest thing on their format, your code breaks. You really are better off with something that has a built in modeling tool or just advising them that if they are going to generate reports they need to generate them 1NF.

Seriously though, I don't think this format is constant enough to parse without creating a very brittle application that will not work correctly 100% of the time.