Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Process of records

Dear All

can VBA easily do this -

I have a file with 2000 transactions from an ERP solution. The transactions
are sorted. A valid transaction A has a record B below it in the file. I want
the rate from record B to replace the rate from record A. So need a way of
reading within records or at least down a record.

Record A 2.33 Code2
Record B 4.66 Code2
Record C 7.99 Code4

I want Record A to recieve 4.66 and not use 2.33. They match because they
both have Code2 as an identifier although my file is much more complex on
what counts as a match

Of course in the file I have lots of records that have no children and I am
trying to only match where I have 1:1 logic

Any help would be appreciated and if you do suggest something thanks in
advance for your time and effort. I am not an advanced VBA user so sorry if I
cannot explain this issue easily.

So far I have the code shown blow to loop through the record set

For Each thecell In Range("B1:B2000")

i = i + 1
If thecell.Value = 0 Then

' Exclude rubbish record no process

Worksheets("Sheet1").Cells(i, 50).Value = "Excluded"


Else

' may be valid based on a number of things
' which we must check


End If

Next thecell

many thanks in advance if you help
--
Chris Ward
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Process of records

problem now solved do not work or look at this question anymore
--
C Ward


"christopher ward" wrote:

Dear All

can VBA easily do this -

I have a file with 2000 transactions from an ERP solution. The transactions
are sorted. A valid transaction A has a record B below it in the file. I want
the rate from record B to replace the rate from record A. So need a way of
reading within records or at least down a record.

Record A 2.33 Code2
Record B 4.66 Code2
Record C 7.99 Code4

I want Record A to recieve 4.66 and not use 2.33. They match because they
both have Code2 as an identifier although my file is much more complex on
what counts as a match

Of course in the file I have lots of records that have no children and I am
trying to only match where I have 1:1 logic

Any help would be appreciated and if you do suggest something thanks in
advance for your time and effort. I am not an advanced VBA user so sorry if I
cannot explain this issue easily.

So far I have the code shown blow to loop through the record set

For Each thecell In Range("B1:B2000")

i = i + 1
If thecell.Value = 0 Then

' Exclude rubbish record no process

Worksheets("Sheet1").Cells(i, 50).Value = "Excluded"


Else

' may be valid based on a number of things
' which we must check


End If

Next thecell

many thanks in advance if you help
--
Chris Ward

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete records when certain records have duplicate column data JVroom New Users to Excel 1 January 26th 09 06:23 PM
Excel VBA process increases exponentially with more records toprocess [email protected] Excel Programming 3 May 13th 08 10:47 AM
draw 999 x 8 random records from file with 8614 records news.wanadoo.nl Excel Programming 1 March 1st 06 03:04 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"