View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Excel 2002 : Formula to pick up codes

Enter and run this macro:

Sub MrLow()
Range("B:B").Copy Range("A1")
lastcell = Range("A65536").End(xlUp).Row
For i = lastcell To 2 Step -1
If Cells(i, 1).Value = Cells(i - 1, 1).Value Then
Cells(i, 1).Delete
End If
Next
End Sub
--
Gary's Student


"Mr. Low" wrote:

Dear Sir,

May I know is there any formula that can be input at cell A1 to pick up the
code in column B without repeating its self when it is copied downwards ?

Worksheet Illustration
A B
1 AXP22 AXP22
2 BJT48 AXP22
3 GFR96 AXP22
4 LPC14 BJT48
5 MAP36 BJT48
6 NBB21 NBB21
7 ZAT11 NBB21
8 LPC14
9 LPC14
10 LPC14
11 MAP36
12 MAP36
13 MAP36
14 ZAT11
15 ZAT11
16 GFR96
17 GFR96


If column B is not sorted, can I use back the same formula ?


Thanks

Low


A36B58K641