Search array from multi-line textbox

acombest

Board Regular
Joined
May 8, 2017
Messages
136
Column A1 to A100 has been numbered 1x(A1) to 100x(A100). I have a userform with a multiline textbox that has a large amount of data dropped in it (example below). I know how to make a search array but I do not know how to parse out the date the way I want. For set 1 (serial 1 amount 1) I want it to find the corresponding row in cloumn A and place the amount in column B. So for example 10x would be matched with column A row 10 and the corresponding amount should be placed on the same row in column B. So on would be row 11 column B should be 11 row 12 column B 602. Series 2 would follow the same logic but for column C. Lastly Each series of data could be up to 10 rows but will not always be 10 rows.


[TABLE="width: 256"]
<colgroup><col style="width:48pt" width="64" span="4"> </colgroup><tbody>[TR]
[TD="class: xl16, width: 64"]Serial 1
[/TD]
[TD="class: xl16, width: 64"]Amnt 1
[/TD]
[TD="class: xl16, width: 64"]Serial 2[/TD]
[TD="class: xl16, width: 64"]Amn2
[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]10X[/TD]
[TD="class: xl16, width: 64, align: right"]189[/TD]
[TD="class: xl16, width: 64"]7X[/TD]
[TD="class: xl16, width: 64, align: right"]40[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]11X[/TD]
[TD="class: xl16, width: 64, align: right"]11[/TD]
[TD="class: xl16, width: 64"]6X[/TD]
[TD="class: xl16, width: 64, align: right"]1018[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]12X[/TD]
[TD="class: xl16, width: 64, align: right"]602[/TD]
[TD="class: xl16, width: 64"]5X[/TD]
[TD="class: xl16, width: 64, align: right"]170[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]13X[/TD]
[TD="class: xl16, width: 64, align: right"]25[/TD]
[TD="class: xl16, width: 64"]4X[/TD]
[TD="class: xl16, width: 64, align: right"]112[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]14X[/TD]
[TD="class: xl16, width: 64, align: right"]153[/TD]
[TD="class: xl16, width: 64"]3X[/TD]
[TD="class: xl16, width: 64, align: right"]102[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]15X
[/TD]
[TD="class: xl16, width: 64, align: right"]4[/TD]
[TD="class: xl16, width: 64"]2X[/TD]
[TD="class: xl16, width: 64, align: right"]599[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]16X
[/TD]
[TD="class: xl16, width: 64, align: right"]1600[/TD]
[TD="class: xl16, width: 64"]1X[/TD]
[TD="class: xl16, width: 64, align: right"]3141[/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]17X[/TD]
[TD="class: xl16, width: 64, align: right"]54[/TD]
[TD="class: xl16, width: 64"][/TD]
[TD="class: xl16, width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]18X[/TD]
[TD="class: xl16, width: 64, align: right"]1[/TD]
[TD="class: xl16, width: 64"][/TD]
[TD="class: xl16, width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl16, width: 64"]19X[/TD]
[TD="class: xl16, width: 64, align: right"]500[/TD]
[TD="class: xl16, width: 64"][/TD]
[TD="class: xl16, width: 64"][/TD]
[/TR]
</tbody>[/TABLE]


the search array I plan on using is as follows, but again I don't know how to parse the information
Code:
For i = 1 To Sh1.Cells(Rows.Count, "A").End(xlUp).Row
If Sh1.Cells(i, 1).Value = parsed data and series1 = true then
Sh1.Cells(i, 2).Value = ???? Parsed data match here
End If
Next i
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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