#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Duplicate values

Hi

I have an workbook that has 31 identical pages which each page refer
to one day of the month. every day my helpers enters some information
in thoes pages.

I want to have code that will help me to search my work book (the 31
Pages) and find the client numbers in the range B4:B37 that has been
duplicated, And create a summary sheet that will show the client
number, how many times the this client number has been duplicated and
the first date the client number has been entered.

Thank you for any help in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Duplicate values

This is a start

Dim aWS As Worksheet, WS As Worksheet
Dim aWSRange As Range, WSRange As Range


For Each aWS In ActiveWorkbook.Worksheets
Set aWSRange = aWS.Range("B4:B37")
For Each WS In ActiveWorkbook.Worksheets
If aWS.Name < WS.Name Then
Set WSRange = WS.Range("B4:B37")
For Each r In aWSRange
Debug.Print WS.Name, r.Address, r.Value
If Not IsEmpty(r) Then
For Each rng In WSRange
Debug.Print aWS.Name, r.Address, r.Value, WS.Name,
rng.Address, rng.Value
If r.Value = rng.Value And Not IsEmpty(rng) Then
MsgBox ("The value " & r.Value & " exists on
worksheet " & aWS.Name & " and " & WS.Name)
End If
Next rng
End If
Next r
End If
Next WS
Next aWS

End Sub


It does compare each sheet twice and I'm sure there's a way have it check
only once, but this should get you part of the way.



" wrote:

Hi

I have an workbook that has 31 identical pages which each page refer
to one day of the month. every day my helpers enters some information
in thoes pages.

I want to have code that will help me to search my work book (the 31
Pages) and find the client numbers in the range B4:B37 that has been
duplicated, And create a summary sheet that will show the client
number, how many times the this client number has been duplicated and
the first date the client number has been entered.

Thank you for any help in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Duplicate values

Take a look at "Data across multiple sheets" at
http://www.smokeylake.com/excel/excel_truths.htm.

--
Earl Kiosterud
www.smokeylake.com

Note: Some folks prefer bottom-posting. But if you bottom-post to a reply that's already
top-posted, the thread gets messy. When in Rome.

-----------------------------------------------------------------------
wrote in message
oups.com...
Hi

I have an workbook that has 31 identical pages which each page refer
to one day of the month. every day my helpers enters some information
in thoes pages.

I want to have code that will help me to search my work book (the 31
Pages) and find the client numbers in the range B4:B37 that has been
duplicated, And create a summary sheet that will show the client
number, how many times the this client number has been duplicated and
the first date the client number has been entered.

Thank you for any help in advance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Duplicate values

Here is a correction so that it only checks each WS pair once

Sub Testing()
Dim aWS As Worksheet, WS As Worksheet
Dim aWSRange As Range, WSRange As Range


For Each aWS In ActiveWorkbook.Worksheets
Set aWSRange = aWS.Range("B4:B37")
For Each WS In ActiveWorkbook.Worksheets
If aWS.Name < WS.Name And WS.Index aWS.Index Then
Set WSRange = WS.Range("B4:B37")
For Each r In aWSRange
Debug.Print WS.Name, r.Address, r.Value
If Not IsEmpty(r) Then
For Each rng In WSRange
Debug.Print aWS.Name, r.Address, r.Value, WS.Name,
rng.Address, rng.Value
If r.Value = rng.Value And Not IsEmpty(rng) Then
MsgBox ("The value " & r.Value & " exists on
worksheet " & aWS.Name & " and " & WS.Name)
End If
Next rng
End If
Next r
End If
Next WS
Next aWS

End Sub

" wrote:

Hi

I have an workbook that has 31 identical pages which each page refer
to one day of the month. every day my helpers enters some information
in thoes pages.

I want to have code that will help me to search my work book (the 31
Pages) and find the client numbers in the range B4:B37 that has been
duplicated, And create a summary sheet that will show the client
number, how many times the this client number has been duplicated and
the first date the client number has been entered.

Thank you for any help in advance.


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
Delete duplicate values NNothard Excel Discussion (Misc queries) 4 June 26th 06 04:43 PM
DUPLICATE VALUES Saintsman Excel Worksheet Functions 2 October 12th 05 05:21 PM
Duplicate values TUNGANA KURMA RAJU Excel Discussion (Misc queries) 4 October 1st 05 01:07 PM
Duplicate values Louise Excel Worksheet Functions 6 April 15th 05 03:39 PM
Sum of Duplicate Values Wynn Excel Worksheet Functions 1 November 13th 04 02:36 AM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"