luvbta.blogg.se

Excel split cells copying values
Excel split cells copying values






excel split cells copying values excel split cells copying values

I found some code on this site ( Split Cells Into Multiple Rows using Vb Code) which has helped, but I am having trouble with it: Here is what I have Sub SplitSerial() However, I am working on a sub that will allow me to go through and separate these serial numbers that are delimited by a comma.

excel split cells copying values

I have a VBA macro that I wrote which imports this data and formats it appropriately for a separate program. Currently, my data is (as below) in a structure that sometimes contains multiple serial numbers belonging to a single part. I probably need to search that as a separate question.I am having a big issue in my quest to learn VBA. I need the last entry to always be in column W, and fill backwards. The lingering issue I'm running into is that if the data set is less than 21 entries (most are 21, but not all), the last column of data ends up at column T or V or something. Selection.Borders(xlInsideHorizontal).LineStyle = xlNone Selection.Borders(xlInsideVertical).LineStyle = xlNone Selection.Borders(xlEdgeRight).LineStyle = xlNone Selection.AutoFill Destination:=Range("D100:V100"), Type:=xlFillDefault Semicolon:=False, Comma:=True, Space:=False, Other:=False, OtherChar _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _ Selection.TextToColumns Destination:=Range("C101"), DataType:=xlDelimited, _ ' Expand Array Data into Columns and do some formatting

excel split cells copying values

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False If WorksheetExists2(Sheet10.Range("B1")) Then Sheet_name_to_create = Sheet10.Range("B1").Value ' First check that new sheet name doesn't already exist, and create sheet Here's what I've ended up using: Sub Expand_Array_On_New_Sheet Thanks all for the help and pointing in the right direction.








Excel split cells copying values