View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Hilton Hilton is offline
external usenet poster
 
Posts: 35
Default Extra functionality required

I have a working programme which aggregates records using a predefined key,
but I need to add the following functionality:

I have a text file (comma separated) which is of the following structure
(goes to1000000 records):
Pol0001 Prev
Pol0001 Other
Pol0001 Other
Pol0001 Curr
Pol0002 Prev
Pol0002 Curr
Pol0003 Prev
Pol0003 Other
Pol0003 Other
Pol0004 Prev
Pol0004 Curr

Each Pol starts with a PREV and end with a CURR. However when there is no
CURR (Pol0003) the programme should interpret this as an "OFF" record and
show the following

Pol0003 Prev
Pol0003 Other
Pol0003 Off

Then the programme will do it's usual aggregation including the newly
identified off records too.

I have tried some code but I am getting very confused as to how to do this.
I'm not aligning the "off" record where it should be.
I need some expert help. A simple example would do.

Can someone please help.

Thanks
Hilton