#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Urgent Help

Hi All,
I have the follwoing data as shown below -
A
1 BRACES
2 BRACES
3 Primary
4 Primary
5 Oracle
6 BRACES
7 BRACES


my question is I want to pinck the distinct names from column A and to print
in diffrent sheet with count of each my out put should be like...
A B
1 BRACES 4
2 Primary 2
3 Oracle 1


TIA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Urgent Help

Hi,

A couple of steps,
First select your list and then
Data|filter|Advanced Filter check unique records only and click OK
Copy this filtered list and paste it into A1 on Sheet 2

Then back to sheet 1 and data|Filter|Show all

Put this formula in B1 on sheet 2 and drag down to the length of column A

=COUNTIF(Sheet1!A1:A20,"="&A1)

Mike


"kiran" wrote:

Hi All,
I have the follwoing data as shown below -
A
1 BRACES
2 BRACES
3 Primary
4 Primary
5 Oracle
6 BRACES
7 BRACES


my question is I want to pinck the distinct names from column A and to print
in diffrent sheet with count of each my out put should be like...
A B
1 BRACES 4
2 Primary 2
3 Oracle 1


TIA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Urgent Help


Sub countitems()

Sh1RowCount = 1
Sh2RowCount = 1
With Sheets("Sheet1")
Do While .Range("A" & Sh1RowCount) < ""
Data = .Range("A" & Sh1RowCount)
With Sheets("Sheet2")
Set c = .Columns("A").Find(what:=Data, _
LookIn:=xlValues, lookat:=xlWhole)
If c Is Nothing Then
.Range("A" & Sh2RowCount) = Data
.Range("B" & Sh2RowCount) = 1
Sh2RowCount = Sh2RowCount + 1
Else
c.Offset(0, 1) = c.Offset(0, 1) + 1
End If

End With
Sh1RowCount = Sh1RowCount + 1
Loop
End With
"kiran" wrote:

Hi All,
I have the follwoing data as shown below -
A
1 BRACES
2 BRACES
3 Primary
4 Primary
5 Oracle
6 BRACES
7 BRACES


my question is I want to pinck the distinct names from column A and to print
in diffrent sheet with count of each my out put should be like...
A B
1 BRACES 4
2 Primary 2
3 Oracle 1


TIA

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Urgent Help

In Case yo uhave spaces in you data replace the following statement

from
Data = .Range("A" & Sh1RowCount)
to
Data = trim(.Range("A" & Sh1RowCount))


"kiran" wrote:

Hi All,
I have the follwoing data as shown below -
A
1 BRACES
2 BRACES
3 Primary
4 Primary
5 Oracle
6 BRACES
7 BRACES


my question is I want to pinck the distinct names from column A and to print
in diffrent sheet with count of each my out put should be like...
A B
1 BRACES 4
2 Primary 2
3 Oracle 1


TIA

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
urgent help helphelp Excel Discussion (Misc queries) 1 May 15th 07 11:30 AM
Urgent-Urgent VBA LOOP Jeff Excel Discussion (Misc queries) 0 October 6th 05 05:46 PM
Macro help urgent urgent Dave Peterson[_3_] Excel Programming 0 September 4th 03 03:59 PM
Macro help urgent urgent chandra Excel Programming 0 September 4th 03 03:50 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"