6/24/2023 0 Comments Excel vba on change columnI am open to any advice, but I am most interested in (1) writing better code in general, and (2) making this script adaptable and easier for others to use. The values (amounts) below these headers are also made into a new field, called "Data" by default. Then gives a name of "Person" for a new field made from values in the headers of the remaining columns to the right. ![]() In this example the user specifies 1 "Header Column" (one column beginning on the left that will remain as is). ![]() The script asked the the user about this data. quantity purchased, for each materials type, by customer) needs to be formatted in a separate row. ![]() The script takes data like this: Materials Person1 Person2Īnd can convert it to this: Person Materials Dataĭata is supplied by a third party. I have a working VBA script for Excel that converts a matrix of data with multiple records in per row to multiple rows with one record per row.Ī StackOverflow user told me that the code could use significant improvement, specifically mentioning implicit variants (not quite sure where I went wrong there), difficult to read code, splitting responsibilities and something about GoTo, the 1980's and raptors.
0 Comments
Leave a Reply. |