LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Function to extract element of a complex delimited string (Pick D3 database)

Hi Excel Gurus,

I have tried doing a google search for something similar to this but had no
luck,
I wonder if you guys/gals could help?

Is there a function (or how would I write a user function) to do the
following.

Assuming I have a text string in a cell delimited as such:

PRODUCT1.CODE-PRODUCT1.NAME-PRODUCT1.COST*PRODUCT2.CODE-PRODUCT2.NAME-PRODUC
T2.PRICE
(1,1) - (1,2) - (1,3) * (2,1) - (2,2) -
(2,3)

* Represents ASCII Char. 254
- Represents ASCII Char. 253

Is it possible to extract 1 of these string elements into another cell in a
manner
similar to this:

=EXTRACT(COL,ROW,1,1) to yield PRODUCT1.CODE from the string

=EXTRACT(COL,ROW,2,3) to yield PRODUCT2.PRICE from the string

I have tried using the FIND() and MID() functions but I think I'm on the
wrong track.

Why do I want to do this? :
I have a Pick/D3 database which uses a 3 dimensional record structure. It is
accessed by a terminal emulator which provides some pick programs and excel
modules that allow communication with excel via DDE. The excel functions
take
the form =pickread("FILENAME","KEY.ID", ATTRIBUTE,VALUE,SUB-VALUE) in the
string
above PRODUCT1.NAME would be in ATTRIBUTE 1 and VALUE 2 (sub-value is not
used in
this example).

I have a spreadsheet that does between 600 and 1200 of these pickread()
functions
which can be very slow if the pick server is under a heavy a load. I would
like to
be able to do one pickread() and return a large delimited record and split
it
up in excel. I realise that this may be a slow task, however nowhere near as
slow
as doing a DDE database read for 1200 cells.

In the ideal world I would like to be able to work with three delimiters,
ASCII chars
252(Sub-Value Mark), 253(Value Mark) and 254(Attribute Mark) so the function
above would
look more like =EXTRACT(COL,ROW,1,2,3) where COL,ROW is the cell that the
large delimited
string is stored in, 1 is the Attribute, 2 is the Value, 3 is the Sub-Value.


I hope this makes sense.


Any help greatly appreciated.


Regards,

John Vinciguerra


 
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
nth element extract RSCARLISLE Excel Worksheet Functions 3 August 2nd 07 09:04 PM
i need help creating a function that will extract words from a string of text [email protected] Excel Worksheet Functions 4 July 20th 07 10:51 PM
Can one store a string in a Array element? [email protected] Excel Discussion (Misc queries) 1 April 17th 07 12:53 PM
array functions and complex element values frustrated Excel Worksheet Functions 0 March 13th 06 11:44 PM
Inserting a string seach within a complex function DJ_Swammi Excel Worksheet Functions 3 December 15th 05 08:30 PM


All times are GMT +1. The time now is 12:00 AM.

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

About Us

"It's about Microsoft Excel"