loop through column, create worksheets based on data within

wpryan

Well-known Member
Joined
May 26, 2009
Messages
534
Office Version
  1. 365
Platform
  1. Windows
I am working on a logfile analysis tool, which will separate some system settings based on the usage of the device which collects the logfiles. In this tool, I will get the .txt file, import into Excel (which I've already created) and then I want to take the information from one of the columns and create new worksheets, the names of which will be based the data found. Additionally, I want the individual rows associated with those to be cut and pasted to the new worksheets. There will be a limited number of new worksheets, because the device limits the usage to about 8 individual applications. The trick is, that the usage data within the logfile will be random. I will need the vba to loop through the column and find those associated rows. I never got the hang of loops in VBA... Any help is appreciated
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
wpryan,

What version of Excel are you using?

Can you post the raw data worksheet, and, post the worksheet results (manually formatted by you) that you are looking for?
To post your data, you can download and install one of the following two programs:
Excel Jeanie
MrExcel HTML Maker
Or, when using Internet Explorer, just put borders around your data in Excel and copy those cells into your post.


If you are not able to give us screenshots:
You can upload your workbook to Box Net,
sensitive data scrubbed/removed/changed
mark the workbook for sharing
and provide us with a link to your workbook.
 
Upvote 0
Thanks for your reply. The data from which I want to create the new worksheets come from column AD. Here is the original formatting:
Excel 2010
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBN
1FlapCutIdStoreTimeUserNameLocationPatientLastNamePatientFirstNamePatientIdBirthdayCornealThicknessNotesSwVersionHwVersionDeviceNumberHandpieceNumberEyeIdFlapCutFkCutDateCutTimeVacuumModeVacuumTargetVacuumReleaseModeTrajectoryFlapDiameterFlapDepthHingePositionHingeWidthHingeLengthSidePathTypePathNamePathParamsDeviceCalibrationSuspendedInterruptedVacuumAppliedVacuumReleasedCutStartCutStopLaserPowerAvgLaserPowerMinLaserPowerMaxLaserPowerStartLaserPowerStopLaserTempAvgLaserTempMinLaserTempMaxLaserTempStartLaserTempStopVacuumAvgVacuumMinVacuumMaxVacuumStartVacuumStopFastScanAvgFastScanMinFastScanMaxFastScanStartFastScanStopRotatorDeltaRotatorSigmaDisposableDisposableISDisposableCustomNumberOfRecutsOrigCutDateOrigCutTime
242211/28/2012 00:01ZiemerLima, Perup11/27/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218272842211/28/2012 12:00:00 AM00:00:45CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:00:0500:01:0300:00:4500:01:003083308130883083308529292929296596266986596923400339834073401340400QTFIG9XM6V7CHQTFIG9XM6V7CH011/28/2012 12:00:00 AM00:00:46
342311/28/2012 00:08ZiemerLima, Peru9911/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218272942311/28/2012 12:00:00 AM00:04:49CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:04:0900:05:0600:04:4900:05:033081307730883083308129293029296946936956946943400339534053400340400QTFIQG5SHC6CSQTFIQG5SHC6CS011/28/2012 12:00:00 AM00:04:49
442411/28/2012 00:13ZiemerLima, Peru]11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273042411/28/2012 12:00:00 AM00:12:03CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:11:4000:12:2000:12:0300:12:173084308130883083308829293029296996977006996993402339434113394340000QTFIQ95MHVSC6QTFIQ95MHVSC6011/28/2012 12:00:00 AM00:12:03
542511/28/2012 00:23ZiemerLima, Perupp11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273142511/28/2012 12:00:00 AM00:17:45CONTROLLED700AUTOMATICCI10600NOTAPPLICABLE00OSFILECIeye=OS;sr=10;ft=0.14;cric=2;ccic=2;crid=7;crisca=80;criad=0;cripd=0.6;crip1=130;crioa1=70;crip2=310;crioa2=70;crip3=220;crioa3=30;ccid=9.5;ccisc=3;cciscaa=70;ccipda=0.2;cciscab=30;ccipdb=0.5;cciscac=70;ccipdc=0.9;ccip1=40;ccioa1=27.9965272104977;ccip2=130;ccioa2=14.0042947399344;ccip3=215;ccioa3=14.0042947399344;criv=1;cciv=2.5;cripow=1.5;ccipow=1.5;incdef=Length;scta=0;sczo=0.01;scfsw=0;scsm=0.1;ado=-0.015A=0.01197, B=0.29325, C=0.418950000:17:2100:18:4900:17:4500:18:473080307430903083308129293029296906896926906903401339634113406340300QTFITGUSBC3CDQTFITGUSBC3CD011/28/2012 12:00:00 AM00:17:46
642611/28/2012 00:32ZiemerLima, Peru'11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273242611/28/2012 12:00:00 AM00:29:12CONTROLLED700AUTOMATICFromFile10485NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;0.61;0.125;20;0;CRI ArCu OS Melen Daisy 2x 90G DAN_7.25mm CT470um AOA_60G APA_87_267G FST1.1_SSZ10_LP150 V40.xmlA=0.01197, B=0.29325, C=0.418950000:28:5500:29:4500:29:1200:29:423074306830813074307929293029297017007027027013401339534083404340100QTFIT9UMBVDC3QTFIT9UMBVDC3011/28/2012 12:00:00 AM00:29:13
742711/28/2012 00:43ZiemerLima, Perup011/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273342711/28/2012 12:00:00 AM00:39:01CONTROLLED700AUTOMATICCI10600NOTAPPLICABLE00OSFILECIeye=OS;sr=10;ft=0.14;cric=2;ccic=2;crid=7;crisca=80;criad=0;cripd=0.6;crip1=130;crioa1=70;crip2=310;crioa2=70;crip3=220;crioa3=30;ccid=9.5;ccisc=3;cciscaa=70;ccipda=0.2;cciscab=30;ccipdb=0.5;cciscac=70;ccipdc=0.9;ccip1=40;ccioa1=28;ccip2=130;ccioa2=14;ccip3=215;ccioa3=14;criv=1;cciv=2.5;cripow=1.5;ccipow=1.5;incdef=Angle;scta=0;sczo=0.01;scfsw=0;scsm=0.2;ado=-0.015A=0.01197, B=0.29325, C=0.418950000:38:3800:40:1000:39:0100:40:083071306530813074306529293029296936926946946933400339334103402340200QTFINGMS3CBCJQTFINGMS3CBCJ011/28/2012 12:00:00 AM00:39:03
842811/28/2012 00:56ZiemerLima, Peru[[11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273442811/28/2012 12:00:00 AM00:49:56CONTROLLED700AUTOMATICCI10600NOTAPPLICABLE00OSFILECIeye=OS;sr=10;ft=0.14;cric=2;ccic=2;crid=7;crisca=80;criad=0;cripd=0.6;crip1=130;crioa1=70;crip2=310;crioa2=70;crip3=220;crioa3=30;ccid=9.5;ccisc=3;cciscaa=70;ccipda=0.2;cciscab=30;ccipdb=0.5;cciscac=70;ccipdc=0.9;ccip1=40;ccioa1=28;ccip2=130;ccioa2=14;ccip3=215;ccioa3=14;criv=1;cciv=2.5;cripow=1.5;ccipow=1.5;incdef=Angle;scta=0;sczo=0.01;scfsw=0;scsm=0.2;ado=-0.015A=0.01197, B=0.29325, C=0.418950000:49:2400:51:0400:49:5600:51:023074306830813079307429293029297107087117107103400339434103404339900QTFIN9MM3VJCBQTFIN9MM3VJCB011/28/2012 12:00:00 AM00:49:57
942911/28/2012 01:09ZiemerLima, Peru''11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273542911/28/2012 12:00:00 AM01:04:49CONTROLLED700AUTOMATICPKP10930NOTAPPLICABLE00OSFILEPKP1;10;0.14;0.93;0.3;9;7.5;0.15;0.015;50;9.9;30;1.3;1.3;1.5;-1;0;0.011;-0.015;0;-1;0;0.008A=0.01197, B=0.29325, C=0.418950001:04:2301:06:0301:04:4901:06:003067305630793068307429293029307007007027027003401339334103400340100QTFIBGPSTCNCVQTFIBGPSTCNCV011/28/2012 12:00:00 AM01:04:50
1043011/28/2012 01:18ZiemerLima, Perupp11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273643011/28/2012 12:00:00 AM01:15:28CONTROLLED700AUTOMATICLK10300NOTAPPLICABLE00OSFILELKFalse;8.4;8.4;90;0.3;90;9.5;3;0;0.01;-0.015;0.015;-0.22;0;0.1;0.5;1;True;1;25;1.2;1.05;0;1;0.4;9.5;335;30;38;0;1.05;3.5;0.8;10.4;1;10A=0.01197, B=0.29325, C=0.418950001:15:0801:16:1001:15:2801:16:073071306530773070307729292929297027017047037043399339234043399339902QTFIB9PMTVVCNQTFIB9PMTVVCN011/28/2012 12:00:00 AM01:15:29
1143111/28/2012 01:28ZiemerLima, Peru011/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273743111/28/2012 12:00:00 AM01:21:33CONTROLLED700AUTOMATICPKP10930NOTAPPLICABLE00OSFILEPKP1;10;0.14;0.93;0.3;7;8;0.1;0;50;9.9;30;1.3;1.3;1.5;-1;0;0.011;-0.015;0;-1;0;0.008A=0.01197, B=0.29325, C=0.418950001:21:1001:22:4701:21:3301:22:433080307430853079308129293029296996987007006983400339234083401340200QTFI3G2SNCTCLQTFI3G2SNCTCL011/28/2012 12:00:00 AM01:21:34
1243211/28/2012 01:44ZiemerLima, Perupp11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273843211/28/2012 12:00:00 AM01:36:26CONTROLLED700AUTOMATICLasikZAxis10110SUPERIOR0.501694.1126OSFILELasikZ_AxisFalse;8.9;8.9;90;54.8435437184962;0.11;70;13;60;0;0.011;-0.015;0.015;-0.21;1.1;0.1;0;25;1;0.97;1.2;0;4;0.11;11;30;45;315;330;1.05;4;0.8;FirstStromaCenter;RadialA=0.01197, B=0.29325, C=0.418950001:36:0501:36:5201:36:2601:36:493068306530723072306829293029296996987017007003400339834053403340200QTFI392MNVLCTQTFI392MNVLCT011/28/2012 12:00:00 AM01:36:26

<tbody>
</tbody>
FlapCutLog_20121130_214240


Here is an example of the formatted text:
Excel 2010
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBN
1FlapCutIdStoreTimeUserNameLocationPatientLastNamePatientFirstNamePatientIdBirthdayCornealThicknessNotesSwVersionHwVersionDeviceNumberHandpieceNumberEyeIdFlapCutFkCutDateCutTimeVacuumModeVacuumTargetVacuumReleaseModeTrajectoryFlapDiameterFlapDepthHingePositionHingeWidthHingeLengthSidePathTypePathNamePathParamsDeviceCalibrationSuspendedInterruptedVacuumAppliedVacuumReleasedCutStartCutStopLaserPowerAvgLaserPowerMinLaserPowerMaxLaserPowerStartLaserPowerStopLaserTempAvgLaserTempMinLaserTempMaxLaserTempStartLaserTempStopVacuumAvgVacuumMinVacuumMaxVacuumStartVacuumStopFastScanAvgFastScanMinFastScanMaxFastScanStartFastScanStopRotatorDeltaRotatorSigmaDisposableDisposableISDisposableCustomNumberOfRecutsOrigCutDateOrigCutTime
242211/28/2012 00:01ZiemerLima, Perup11/27/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218272842211/28/2012 12:00:00 AM00:00:45CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:00:0500:01:0300:00:4500:01:003083308130883083308529292929296596266986596923400339834073401340400QTFIG9XM6V7CHQTFIG9XM6V7CH011/28/2012 12:00:00 AM00:00:46
342311/28/2012 00:08ZiemerLima, Peru9911/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218272942311/28/2012 12:00:00 AM00:04:49CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:04:0900:05:0600:04:4900:05:033081307730883083308129293029296946936956946943400339534053400340400QTFIQG5SHC6CSQTFIQG5SHC6CS011/28/2012 12:00:00 AM00:04:49
442411/28/2012 00:13ZiemerLima, Peru]11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273042411/28/2012 12:00:00 AM00:12:03CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xmlA=0.01197, B=0.29325, C=0.418950000:11:4000:12:2000:12:0300:12:173084308130883083308829293029296996977006996993402339434113394340000QTFIQ95MHVSC6QTFIQ95MHVSC6011/28/2012 12:00:00 AM00:12:03
542611/28/2012 00:32ZiemerLima, Peru'11/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218273242611/28/2012 12:00:00 AM00:29:12CONTROLLED700AUTOMATICFromFile10485NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;0.61;0.125;20;0;CRI ArCu OS Melen Daisy 2x 90G DAN_7.25mm CT470um AOA_60G APA_87_267G FST1.1_SSZ10_LP150 V40.xmlA=0.01197, B=0.29325, C=0.418950000:28:5500:29:4500:29:1200:29:423074306830813074307929293029297017007027027013401339534083404340100QTFIT9UMBVDC3QTFIT9UMBVDC3011/28/2012 12:00:00 AM00:29:13
643811/28/2012 18:52ZiemerLima, Peru011/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218274843811/28/2012 12:00:00 AM18:52:21CONTROLLED700AUTOMATICFromFile10915NOTAPPLICABLE00ODFILETrajectoryFromFile2;0;10;0.14;0.14;0.11;1.04;0.125;20;1;CCI Rad O PIOL OD 3xTunnel 9.7_6.13x3.8_1.4mm 90G_35G_135G 6.13_7.4_9.7 TB210_200 v4.xmlA=0.01197, B=0.29325, C=0.418950018:52:0118:52:4618:52:2118:52:433076307230833077307729292929297057047067057053403339934083404340800QTFI69CMGVKCQQTFI69CMGVKCQ011/28/2012 12:00:00 AM18:52:21
743911/28/2012 20:02ZiemerLima, Peru011/28/2012 12:00:00 AM4.2.5.8098FLM3CFLM23215.1.218274943911/28/2012 12:00:00 AM20:01:10CONTROLLED700AUTOMATICFromFile10588NOTAPPLICABLE00OSFILETrajectoryFromFile1;10;10;0.14;0.14;0.11;0.713;0.125;20;0;CRI ArCu OS Vera quispe 2x 60G DAN_6.75mm CT573um AOA_90G APA_104_284G FST1.1_SSZ10_LP150 V40.xmlA=0.01197, B=0.29325, C=0.418950020:00:2420:01:4720:01:1020:01:443080307430853083308129293029296986977006996983401339334083402339700QTFIH9RMQV8CGQTFIH9RMQV8CG011/28/2012 12:00:00 AM20:01:11

<tbody>
</tbody>
TrajectoryFromFile


...I never used this HTML generator so I hope it comes out OK. ...looks funny on the reply screen...
 
Last edited:
Upvote 0
wpryan,

The data you posted is way to wide to copy everything into a worksheet.

We will need the raw data worksheet and at least two new worksheets manually creted by you for the results you are looking for.

You can upload your workbook to Box Net,
sensitive data scrubbed/removed/changed
mark the workbook for sharing
and provide us with a link to your workbook.
 
Upvote 0
wpryan,

Thanks for the workbook.

The below macro assumes that the first (only) worksheet (the worsheet to the left of the list of tab names) contains the raw data.

The below macro created the 6 new worksheets with their respective data, in 0.180 seconds on my Lenovo T61 laptop computer.


Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
2. Open your workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. Press the keys ALT + I to activate the Insert menu
5. Press M to insert a Standard Module
6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
7. Press the keys ALT + Q to exit the Editor, and return to Excel
8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


Code:
Option Explicit
Sub DistributeRowsPlus()
' hiker95, 12/10/2012
' http://www.mrexcel.com/forum/excel-questions/673864-loop-through-column-create-worksheets-based-data-within.html
Dim w1 As Worksheet, wT As Worksheet, wN As Worksheet
Dim r As Long, lr As Long, lrt As Long, nr As Long, lc As Long, h As String, s
Set w1 = Worksheets(1)
lr = w1.Range("A" & Rows.Count).End(xlUp).Row
If lr = 1 Then
  MsgBox "There is no raw data to move in worksheet '" & w1.Name & "' - macro terminated!"
  Exit Sub
End If
Application.ScreenUpdating = False
If Not Evaluate("ISREF(Temp!A1)") Then Worksheets.Add(After:=w1).Name = "Temp"
Set wT = Worksheets("Temp")
wT.UsedRange.Clear
w1.Range("AD1:AD" & lr).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=wT.Range("A1"), Unique:=True
lrt = wT.Range("A" & Rows.Count).End(xlUp).Row
For r = 2 To lrt
  If Not Evaluate("ISREF(" & wT.Range("A2") & "!A1)") Then
    Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = wT.Range("A2")
    h = wT.Range("A2")
    Set wN = Worksheets(h)
    w1.Rows("1:" & lr).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=wT.Range("A1:A2"), _
      CopyToRange:=wN.Range("A1"), Unique:=False
    wN.Rows(1).Value = w1.Rows(1).Value
    wN.UsedRange.Columns.AutoFit
    wT.Rows(2).Delete
  End If
Next r
Application.DisplayAlerts = False
wT.Delete
Application.DisplayAlerts = True
lc = w1.Cells(1, Columns.Count).End(xlToLeft).Column
w1.Range(w1.Cells(2, 1), w1.Cells(lr, lc)).Clear
w1.Activate
Application.ScreenUpdating = True
End Sub


Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


Then run the DistributeRowsPlus macro.
 
Upvote 0
Wow. I mean, like, wow. You are fantastic. Great job.
 
Upvote 0
wpryan,

Thanks for the feedback.

You are very welcome. Glad I could help.

Come back anytime.
 
Upvote 0
well, since you offered... What I intended to do with this data was to take the colon separated values in column AE and do a "text to column" conversion. Actually I have some code which imports the data from the original text file, and then strips away any other data that I am not interested in. The code is actually here:
Code:
Private Sub ImportData()

    Sheet1.Select
    'UsedRange.Delete
        
    fileToOpen = Application _
        .GetOpenFilename("Text Files (*.txt), *.txt")
        
    Workbooks.OpenText Filename:= _
            fileToOpen, _
            Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
            xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
            Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
            Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _
            Array(9, 1), Array(10, 1)), TrailingMinusNumbers:=True
            


    ActiveSheet.Columns("A:BN").Select
    Selection.Copy
    Application.DisplayAlerts = False
    ActiveWindow.Close


    Windows("Flap Cut Log Tool.xlsm").Activate
    Range("A1").Select
    ActiveSheet.Paste
    
    Sheets("Sheet1").Select
    
    Range("D:F,H:N,O:O,P:P,S:V,AF:BN").Select
    Range("AF1").Activate
    Selection.Delete Shift:=xlToLeft
    
    Range("D:D,J:J,K:K").Select
    Selection.NumberFormat = "General"
    
End Sub

The column which has the PathParams data is now in column O. The rest of the data after that is deleted. Ultimately I'd like the cells from O1 to the end of the data set (meaning - data which was parsed from the text to column routine) be populated with some text, however, the text will be different for each worksheet. If that isn't possible I can rethink it and maybe write individual macros to populate those cells.
 
Upvote 0
wpryan,

The column which has the PathParams data is now in column O. The rest of the data after that is deleted. Ultimately I'd like the cells from O1 to the end of the data set (meaning - data which was parsed from the text to column routine) be populated with some text, however, the text will be different for each worksheet. If that isn't possible I can rethink it and maybe write individual macros to populate those cells.

So, your macro will remove columns in the 6 to eight new worksheets, and the PathParams original column AE will now be column O.

How is the data in column O parsed?

If this is in O2:
1;10;10;0.14;0.14;0.11;1.04;0.125;20;0;CCI Rad N OS 2xTunnel 9.7_6.13x2.3_1.2mm_135G_45G 900_350_-15um 6.13_7.4_9.7 TB210_200 v4 LP160.xml

Is the new O2 = 1?

Is the new P2 = 10??????


I would have to see another workbook with the original raw data in the first worksheet, and say display worksheet CI before and after results:

Worksheet CI, and worksheet CI_After manually formatted by you to the new results you are looking for.


the text will be different for each worksheet

I am not sure what this means.
 
Upvote 0

Forum statistics

Threads
1,215,655
Messages
6,126,053
Members
449,283
Latest member
GeisonGDC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top