Convert Data from Code/Amount Set to Proper Record

RGottesman

New member
Joined
Mar 4, 2015
Messages
5
Reaction score
0
Points
0
I need to convert data received from the system that is in the following format
IDCodeAmountcode2amount2code3amount3code4amount4
123REG40VAC24PTO16
456O/T10REG72VAC8

To a more usable format of either

idcodeamount
123REG40
123VAC24
123PTO16
456O/T10
456REG72
456VAC8

Or a table by code

IDREGVACPTOO/T
123402416
45672810


Any suggestions will be greatly appreciated, thank you in advance
 
Hi,

I'd need to know what version of Excel are you using and if there is MAX number of amounts to deal:more or less.

Regards
 
Hi again ,

...there is MAX number of amounts per Id to deal .

Sorry if my English is not clear.
 
In this file, there are up to 50 sets of codes and amounts
 
Hi again,

thanks, 50 sets per ID means a database with 150 columns.

I'd need to know what version are you using, I would like to use AGGREGATE (available from Excel 2010 and newer versions).

Regards
 
Last edited:
Hi


in the attachment DATA in A1:I1000

Formulas to be copied down

in M2

Code:
=iferror(index($a$2:$a$1000,match(aggregate(15,6,subtotal(2,offset($b$2,,,row($2:$1000)-1,columns($b:$i)))/(subtotal(2,offset($b$2,,,row($2:$1000)-1,columns($b:$i)))>=rows(a$1:a1)),1),index(subtotal(2,offset($b$2,,,row($2:$1000)-1,columns(b:i))),),0)),"")

in N2

Code:
=iferror(index($a$2:$i$1000,match(m2,$a$2:$a$1000,0),countif($m$2:m2,m2)*2),"")

in O2

Code:
=iferror(index($a$2:$i$1000,match(m2,$a$2:$a$1000,0),countif($m$2:m2,m2)*2+1),"")


Regards
 

Attachments

  • ripeti dato riga su ampiezza colonna.xlsx
    11.1 KB · Views: 5
Back
Top