1

In Excel, how can I merge multiple columns into single one (i.e., split one row into multiple rows) based on ID?

The image below illustrates what I want to do. ID and Catalog Code are unique but their assigned Supplier and Supplier Code aren't (e.g., cells F6 and H4).

This is just a sample of my data (the full data set has over 15000 rows).

THIS IMAGE EXPLAINS EVERYTHING

zola
  • 11

1 Answers1

0

You can use vbScript to automate this activity

High Level Logic

  1. Create a file named excel.vbs
  2. Open existing file
  3. Create a new sheet in the same file Set objWrkBk = objXL.Workbooks.Add
  4. Create a iteration block using for, while or your preferred code to read the data from this existing file
  5. within the loop start writing data to your logic. you would be able to increment the columns numbers in each pass
  6. Save the new file
SeanClt
  • 2,227