Find pattern last row num and assigned num

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000

Hi,

I got pattern in column C and in the column D Assign Num and in the column F got 27 unique patterns

I am looking for 2 results...
1) In the column G find last the last row number of the each pattern
2) In the column H find the assigned number is matched in the column D in the row find pattern

Example....


Book1
ABCDEFGHI
1
2
3Find Last
4PatternAssigned NumPatternRow NAssigned Num
51 | 1 | 11 | 1 | 15123
61 | 1 | 201 | 1 | 25230
72 | 2 | 201 | 1 | X5314
82 | 2 | X01 | 2 | 17218
92 | X | 101 | 2 | 25514
102 | X | 201 | 2 | X5614
112 | 2 | 10X | X | 1
121 | X | 101 | X | 25823
131 | X | X01 | X | X5923
141 | 1 | X02 | 1 | 16023
151 | 2 | 10X | 2 | X
162 | 2 | 152 | 1 | X6218
171 | X | X42 | 2 | 18017
182 | 1 | 102 | 2 | 28117
192 | 1 | 202 | 2 | X8217
20X | 1 | X0X | X | X
211 | 1 | 1162 | X | 24939
221 | 1 | 2162 | X | X500
231 | 1 | X9X | 1 | 1759
241 | 2 | 19X | 1 | 2765
251 | 2 | 20X | 1 | X779
261 | 2 | X0X | 2 | 1789
271 | X | 115X | 2 | 2799
281 | 1 | 17X | X | 2
291 | X | 202 | 1 | 26123
301 | X | X131 | X | 1851
312 | 1 | 1132 | X | 1839
322 | 1 | 213
332 | 2 | 117
341 | X | X4
351 | X | 26
361 | X | X2
372 | 1 | 16
382 | 1 | 26
391 | 1 | X16
401 | 2 | 116
411 | 2 | 216
421 | 2 | X16
431 | X | 116
442 | 1 | X0
452 | 2 | 112
462 | 2 | 239
472 | 2 | X39
482 | X | 139
492 | X | 239
502 | X | X0
511 | 1 | 123
521 | 1 | 230
531 | 1 | X14
541 | 2 | 114
551 | 2 | 214
561 | 2 | X14
571 | X | 114
581 | X | 223
591 | X | X23
602 | 1 | 123
612 | 1 | 223
622 | 1 | X18
632 | 2 | 118
642 | 2 | 218
652 | 2 | X18
66X | 1 | 10
67X | 1 | 20
68X | 1 | X48
69X | 2 | 10
70X | 2 | 20
71X | 1 | 24
721 | 2 | 118
731 | X | 116
742 | X | 126
75X | 1 | 19
76X | 1 | 25
77X | 1 | X9
78X | 2 | 19
79X | 2 | 29
802 | 2 | 117
812 | 2 | 217
822 | 2 | X17
832 | X | 19
841 | X | 111
851 | X | 11
86
87
88
89
90
Sheet1


Thank you in advance

Regards,
Kishan
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try this in G5 and H5 and copy down for each pattern you've listed:

GH
55123

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet10

Worksheet Formulas
CellFormula
H5=IF(G5="","",INDEX($D$1:$D$85,G5))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
G5{=IF(MAX((F5=$C$5:$C$85)*(ROW($C$5:$C$85)))=0,"",MAX((F5=$C$5:$C$85)*(ROW($C$5:$C$85))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Try this in G5 and H5 and copy down for each pattern you've listed:

G
H
5
51
23

<tbody>
</tbody>
Sheet10


Worksheet Formulas
Cell
Formula
H5
=IF(G5="","",INDEX($D$1:$D$85,G5))

<tbody>
</tbody>

<tbody>
</tbody>


Array Formulas
Cell
Formula
G5
{=IF(MAX((F5=$C$5:$C$85)*(ROW($C$5:$C$85)))=0,"",MAX((F5=$C$5:$C$85)*(ROW($C$5:$C$85))))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself

<tbody>
</tbody>
DRSteele, getting requested results Prefect!!

Thank you for giving a spot on solution

Regards,
Kishan :)
 
Upvote 0

Forum statistics

Threads
1,214,785
Messages
6,121,543
Members
449,038
Latest member
Guest1337

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