Excel - Converting data for SAP upload

Closed
dd1975 Posts 1 Registration date Tuesday March 2, 2010 Status Member Last seen March 2, 2010 - Mar 2, 2010 at 07:21 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 2, 2010 at 07:34 AM
Hello everyone,

I have an Excel sheet with the folowing data as example:

_______|_Product1_|_Product2_|_Product3_|
Name1_|___15€___|_________|___10€___|
Name2_|_________|___13€___|_________|
Name3_|_________|_________|___11€___|


Now I would need to convert this data for an upload in SAP. It should look like this:

Name1_|_Product1_|___15€___|
Name1_|_Product3_|___10€___|
Name2_|_Product2_|___13€___|
Name3_|_Product3_|___11€___|


Does anyone has a briljant idea on how to convert this data with a macro or in VBA?

All help would be very appreciated.

Grtz
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 2, 2010 at 07:34 AM
One way could be

1. Read first line and store products in array.

2. create a do while loop till row does not have a value in column A

3. Create a row counter

4. Store the value of cell A in that row

5. create a for loop with in the do loop to scan each cell. Max would be the max number of column that you could have

6. scan each cell with in your for loop to see if it has a value. if it does just copy by name, product (array index would help as it is column -2) and the price to a new sheet
0