Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Checking for duplicates

Hi, I need to be able to check multiple worksheets to see if a reference
number already exists. I have tried various functins such as count if etc
and the consilidate function but to no avail. Is there a way that I can
create a macro that checks to see if the number already exists on another
worksheet? This will be in a shared workbook?

Thanks in advance for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Checking for duplicates

VBA code and shared workbooks don't get along. What you are asking for would
be tough enough without the shared restriction. I am not saying that you will
not be able to make it work with a macro but it may be a real up hill battle.
It may also not be possible.

Not tested but something like this might help... No guarantees with a shared
workbook.

dim wks as worksheet
dim rngFound as range

for each wks in worksheets
set rngfound = wks.cells.find(what:="Tada", _
LookAt:=xlwhole, _
LookIn:=xlformulas, _
matchCase:=true)
if not rngfound is nothing then msgbox rngfound.parent.name &
rngfound.address
next wks
--
HTH...

Jim Thomlinson


"RAYCV" wrote:

Hi, I need to be able to check multiple worksheets to see if a reference
number already exists. I have tried various functins such as count if etc
and the consilidate function but to no avail. Is there a way that I can
create a macro that checks to see if the number already exists on another
worksheet? This will be in a shared workbook?

Thanks in advance for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Checking for duplicates

Jim,

Thanks for your response.

Would it then be possible to record a macro that does a Find in the workbook
to see if a number already exists using just a dialogue box, and amessage box
if it does appear rather than using the defualt Ctrl+F and changing the
search range to workbook?

"Jim Thomlinson" wrote:

VBA code and shared workbooks don't get along. What you are asking for would
be tough enough without the shared restriction. I am not saying that you will
not be able to make it work with a macro but it may be a real up hill battle.
It may also not be possible.

Not tested but something like this might help... No guarantees with a shared
workbook.

dim wks as worksheet
dim rngFound as range

for each wks in worksheets
set rngfound = wks.cells.find(what:="Tada", _
LookAt:=xlwhole, _
LookIn:=xlformulas, _
matchCase:=true)
if not rngfound is nothing then msgbox rngfound.parent.name &
rngfound.address
next wks
--
HTH...

Jim Thomlinson


"RAYCV" wrote:

Hi, I need to be able to check multiple worksheets to see if a reference
number already exists. I have tried various functins such as count if etc
and the consilidate function but to no avail. Is there a way that I can
create a macro that checks to see if the number already exists on another
worksheet? This will be in a shared workbook?

Thanks in advance for any help.

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
Checking for Duplicates within a Workbook RAYCV Excel Worksheet Functions 7 September 23rd 08 12:10 PM
checking for duplicates Ted Metro Excel Worksheet Functions 1 April 3rd 07 05:42 PM
Checking for duplicates: VBA Jim[_49_] Excel Programming 4 December 2nd 04 01:22 PM
Checking entire row for duplicates Mark Driscol Excel Programming 0 July 14th 04 07:32 PM
Checking for duplicates? Eric G[_3_] Excel Programming 4 April 8th 04 02:54 AM


All times are GMT +1. The time now is 04:03 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"