Vba to find the row number in the within a block of data

Jim885

Well-known Member
Joined
Jul 8, 2012
Messages
663
I have the below data set.



I'm trying to transfer a given block of data onto a userform based on finding the value (ticket #) in column A
In the case of ticket# 50503 there are a total of four line items that need to be captured (columns E, F & G) and listed in the respected text boxes on a userform.
The amount of rows varies by each ticket number. Some have two lines, some have 3, 7 8 etc.,

What can I use and how can I find the last row within any given block of data?
Once found, how can a loop be setup for this?
Ticket #MakeModelColorPart#QtyServiceDescriptionTechExpected ReturnReturned to ShopInvoice #Complete
or Partial
50500​
ChevyCamaroWhite1013AA33 LINE SVCBrian3/26/20204/9/202065231
1051AA23 LINE SVC
1051.11AB43 LINE CLR
50501​
ChevyCorvetteCream1013AB83 LINE SVCMatt3/27/20204/9/2020 & 4/9/202015440 / 626
1051AA23 LINE SVC
50502​
FordEscapeBlue1014AB23 LINE SVCChris3/30/20204/9/202084805
1051AA23 LINE SVC
1011.11215z3 LINE CLR
1051.11314z3 LINE CLR
1051.2111sz3 LINE CLR
50503​
ToyotaCamrySilver1011AB23 LINE SVCSteve3/31/20204/9/2020010810
1011.11215z3 LINE CLR
1051.11314z3 LINE CLR
1051.2111z3 LINE CLR
50504​
FordF-150Black10115z2z2 LINE SVCAlex4/1/20204/9/2020515008
10121z3z2 LINE SVC
10133z4z2 LINE SVC
10142z6z2 LINE SVC
21143szCLR
50505​
DodgeChallengerSilver21243swCLRCharlie4/2/20204/9/202000156
2132AW1CLR
2142Aw6CLR
2151z9zMXA X
10512zc5MK4
50506​
ChevyMalibuWhite10521zc6RGwBrian4/3/20204/9/202010510
10531zc7Feg
11612zd6RTG
50507​
BMW640iRed11622zd7GXRSteve4/7/20204/11/20203215
10521zdQGSE
50508​
BMW440iWhite10113z2z2 LINE SVCJerry4/8/20204/11/202012131
2152z9zFEM
10511zc5PLG
11614zd6RWE
11622zd7ETW
1076ZC4SSR
 
You're welcome & thanks for the feedback
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,409
Messages
6,119,339
Members
448,888
Latest member
Arle8907

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