Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




397 posts

Ultimate Geek

Trusted

Topic # 84630 3-Jun-2011 16:23
Send private message

I have extracted some data, which is text information with a unique key.  In some (or most) circumstances the data is formatted on different lines with the same unique key. 

To keep fidelity of the format it was extracted, I want to add a sequential number, restarting when the unique key changes.  Any ideas?

A12  SWITCH: TEMPERATURE
A12  Model 123
A12  Supplier: Acme
B21  Gasket
C54  SWITCH: TEMPERATURE
C54  Model 124
C54  Supplier: Acme
D66  Blah

A12  1 SWITCH: TEMPERATURE
A12  2 Model 123
A12  3 Supplier: Acme
B21  1 Gasket
C54  1 SWITCH: TEMPERATURE
C54  2 Model 124
C54  3 Supplier: Acme
D66  1 Blah

Any ideas?





Cheers, Stevo

Create new topic
26 posts

Geek
+1 received by user: 2


  Reply # 477505 3-Jun-2011 16:34
Send private message

A12    1                                   SWITCH: TEMPERATURE
A12    =IF(A2=A3,1+B2,1)         Model 123
A12    =IF(A3=A4,1+B3,1)         Supplier: Acme
B21    =IF(A4=A5,1+B4,1)         Gasket
C54    =IF(A5=A6,1+B5,1)         SWITCH: TEMPERATURE
C54    =IF(A6=A7,1+B6,1)         Model 124
C54    =IF(A7=A8,1+B7,1)         Supplier: Acme
D66    =IF(A8=A9,1+B8,1)         Blah



This might work for you...



397 posts

Ultimate Geek

Trusted

  Reply # 477508 3-Jun-2011 16:39
Send private message

Worked a treat... thanks my brain is Friiiied

Embarassed




Cheers, Stevo

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

CPTPP text and National Interest Analysis released for public scrutiny
Posted 21-Feb-2018 19:43


Foodstuffs to trial digitised shopping trolleys
Posted 21-Feb-2018 18:27


2018: The year of zero-login, smart cars & the biometrics of things
Posted 21-Feb-2018 18:25


Intel reimagines data centre storage with new 3D NAND SSDs
Posted 16-Feb-2018 15:21


Ground-breaking business programme begins in Hamilton
Posted 16-Feb-2018 10:18


Government to continue search for first Chief Technology Officer
Posted 12-Feb-2018 20:30


Time to take Appleā€™s iPad Pro seriously
Posted 12-Feb-2018 16:54


New Fujifilm X-A5 brings selfie features to mirrorless camera
Posted 9-Feb-2018 09:12


D-Link ANZ expands connected smart home with new HD Wi-Fi cameras
Posted 9-Feb-2018 09:01


Dragon Professional for Mac V6: Near perfect dictation
Posted 9-Feb-2018 08:26


OPPO announces R11s with claims to be the picture perfect smartphone
Posted 2-Feb-2018 13:28


Vocus Communications wins a place on the TaaS panel
Posted 26-Jan-2018 15:16


SwipedOn raises $1 million capital
Posted 26-Jan-2018 15:15


Slingshot offers unlimited gigabit fibre for under a ton
Posted 25-Jan-2018 13:51


Spark doubles down on wireless broadband
Posted 24-Jan-2018 15:44



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.