Link to home
Start Free TrialLog in
Avatar of Dare626
Dare626Flag for United States of America

asked on

Data compiled in 1 Row Horizontally, Placed on Individual Vertical Rows

Dear Experts,

I have a table with 2 columns (MEM_NO and HCC_CODES_COMPILED) with thousands of rows. the HCC_CODES_COMPILED) is a field with information concatenated with multiple HCC Codes going horizontal i would like to run some code that will output the each HCC Code into its own row with the same member number. I've attached an illustration of the problem so your viewing.

In a nutshell if a  MEM_NO 1234567*01 has the Following HCC_CODE1, HCC_CODE2, HCC_CD3 Then a solution would be
1234567*01 HCC_CD1
1234567*01 HCC_CD2
1234567*01 HCC_CD3

Thank you much.
Problem-Visualized.docx
Avatar of E C
E C
Flag of United States of America image

What is the delimiter for the individual elements in HCC_CODES_COMPILED ?

A comma?
Is it ALWAYS a comma?
Would any of the codes themselves ever contain commas (as part of the code)
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dare626, are these HCC_Bucket_Findings the same results from the text file from your last question?  If they are, then it's easy to change the previous VBA code to create this table.

Ron

Edit... Then again, Miriam's solution is just as simple.
Avatar of Dare626

ASKER

Thank you for the code it worked exactly how i wanted it.  SInta it was the same output that was given to the text file you coded for me ealier. I appreciate all of your fast responses!
Dare626,

I'm glad this helped out (with correcting existing data?)

I missed the earlier question, but you should definitely revisit it with Ron (either back at the original question if it really is a 'quick fix' or by posting a new question if it is more involved) so future data gets written the way you want it to... its better to get it written correctly in the first place than to correct output that is not quite in the format you want :)