Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba - counting different items

Hi

I need to know how many different variables for each day

Range A1:A4 contains
2004-08-01
2004-08-01
2004-08-01
2004-08-02

Range B1:B4 contains
abc
bbb
abc
ccc

In VBA, how can I get that?

I should get:
2004-08-01 - 2
2004-08-02 - 1

thanks


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vba - counting different items

If you don't mind putting the results on the worksheet, you can use the
Advanced filter using the Unique setting. Turn on the recorder while you do
it manually to get the code.

--
Regards,
Tom Ogilvy


"abc2002 " wrote in message
...
Hi

I need to know how many different variables for each day

Range A1:A4 contains
2004-08-01
2004-08-01
2004-08-01
2004-08-02

Range B1:B4 contains
abc
bbb
abc
ccc

In VBA, how can I get that?

I should get:
2004-08-01 - 2
2004-08-02 - 1

thanks


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default vba - counting different items

Does it have to be VBA?

An Advanced Filter that extracts Date and Variable, Copy to New Location,
Unique Rows will eliminate all duplicates.

Then a Pivot table can count by date.

Stephen Rasey
WiserWays, LLC
Houston
http://excelsig.org


"abc2002 " wrote in message
...
Hi

I need to know how many different variables for each day

Range A1:A4 contains
2004-08-01
2004-08-01
2004-08-01
2004-08-02

Range B1:B4 contains
abc
bbb
abc
ccc

In VBA, how can I get that?

I should get:
2004-08-01 - 2
2004-08-02 - 1

thanks


---
Message posted from http://www.ExcelForum.com/



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
Counting Items Jakobshavn Isbrae Excel Worksheet Functions 20 June 22nd 08 09:27 PM
Counting items dmack Excel Discussion (Misc queries) 0 January 24th 07 09:47 PM
Counting the items Tyrone Lopez Excel Worksheet Functions 4 May 25th 06 07:51 AM
Counting different items in one column Chris Excel Discussion (Misc queries) 2 March 23rd 06 09:08 PM
Counting items Garry[_3_] Excel Programming 3 December 18th 03 01:42 PM


All times are GMT +1. The time now is 12:54 AM.

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"