Rick,
I'm glad for, somehow, have contributed to a better solution.
New code copied for future use.
Regards,
M.
Rick,
I'm glad for, somehow, have contributed to a better solution.
New code copied for future use.
Regards,
M.
very nice. i was looking for this code. coincidentally, i searched before posting the question in Mrexcel forum and here i got exactly what i needed.
thank you Rick and Marcelo.
Last edited by Excel Fox; 08-18-2013 at 08:39 PM. Reason: Quote removed as it didn't add value to the post
Nice piece of code, although I see a problem, when a value is blank in another collumn, it is copied from the cell that contains a value, so it filles other empty cells with bogus data
Eg.
AA BBB 1:2
CC 2:3
Will become:
AA BBB 1
AA BBB 2
CC BBB 2
CC BBB 3
Any solution for this ?
Hello. This macro works beautifully, however is there a way to do this same function to multiple columns with multi-values?
My data looks like this:
Column 1 Column 2 Multi-value Column Multi-value column
Data Data RMA;-;RMA 65044;99944;65033
The multi-values all correspond with each other.
This is a break down of service work orders, line items such as labor, travel, parts and if it is returnable.
Your help is greatly appreciated.
Hi Rick,
This is great and is almost exactly what I am looking for. I have two (hopefully small) issues with the code though.
What I changed: I updated the range from A:C to be A:Z,and to start at Row 6 (headings in row 5) as per my data. Then have created the macro twice to once sperate column G and then next Column E. This works great (although I am sure you could do this in one - but it is beyond me to manipulate it that much).
Issue 1: comes when I look at the copied data results. Column U to Y have a heading in Row 5 but no data/are blank (they are for use later on). So no data should have been copied. But instead the code copies the headings from Row 5...?? ANy ideas on how to fix this?
Issue 2: comes when I have 2 columns column C+D that I need to split together - C is material number and D is material Name.
e.g
material number Material Name
100017, 100018 Mat A, Mat B
Should become
Mateiral Number Material Name
100017 Mat A
100018 Mat B
If I was to run the eixisting macro twice for Column C then D I would actually get after the first run
100017 Mat A, Mat B
100018 Mat A, Mat B
Then after the second run
100017 Mat A
100017 Mat B
100018 Mat A
100018 Mat B
Any ideas?
Many Thanks in advance!
Last edited by Excel Fox; 07-30-2014 at 03:40 PM. Reason: Removed Quote
Hi, There occurs a problem with the other columns. Some of the columns are not fully completed, I mean half of the column has something in it and the other half is empty. When I run the code, it fullfills the other rest of the column with the value of last unempty cell. It stretches the last cell to the length of the longest column. Does any body have an idea with this code to fix it?
Thanks in advance,
Regards,
That is how the code was designed. When data is missing and the user wants to fill it in, normally they want to do that fill for the data item and, since there is no way to know how far that last item should be filled for, I chose to use the row with the last data item as the stopping point. Until your post, that is the functionality everyone has wanted. If you post a sample worksheet with existing data on Sheet1 and what you want that data to look like on Sheet2, I will try to modify the code for you to do what you show me you want.
MMVAL V1_BOM.xls
That is the sheet I wanna modify and after the code executed I want it to be like;
MMVAL V1_BOM_modified.xls
but It fullfills the rest of column K with the last statement "C15" and it goes down to length of longest column.
Thank you for your concern.
Regards
Code:Sub M_snb() sn = Sayfa1.Cells(1).CurrentRegion sp = Split(Join(Application.Transpose(Application.Index(sn, 0, 4)), ","), ",") c00 = "1_" For j = 2 To UBound(sn) c00 = c00 & Replace(Space(sn(j, 3)), " ", j & "_") Next st = Application.Index(sn, Application.Transpose(Split(c00, "_")), [transpose(row(1:12))]) For j = 2 To UBound(st) - 1 st(j, 4) = sp(j - 1) Next Sayfa1.Cells(40, 1).Resize(UBound(st) - 1, UBound(st, 2)) = st End Sub
Bookmarks