Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Check whether data exists in Sheet..

Hi All,

I have to enter in my sheet1 c4 Name
in C12 i have three sheet names like Sheet1, sheet2,
sheet3

When i reach C13 i have to check whther the name I
entered already exixts in the specific sheet ie. for eg.
if my C12 contains sheet2 i want to check the name
entered in C4 already exixts in Sheet2 Range A1 thru end
of list (dynamic)

If the name exists then msg box alerting and select c4 ..

Hoew can I code this?

is it possible to do it other than in Worksheet_Change or
Worksheet_SelectionChange since i have several code
already there?
just call this macro from there?
I have already some code based on my selection of C13.
i want to check this one also while i am in C13

any help?

TIA
Soniya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Check whether data exists in Sheet..

In your C13 bit of code in worksheet_change event, add this

dim xc as range
set xc = worksheets(range("c12").text).columns(1).find(rang e("c4").text)
if not sc is nothing then msgbox xc.text & " exists in " & range("c12").text

The code is untested, use as a guide.

"Soniya" wrote in message
...
Hi All,

I have to enter in my sheet1 c4 Name
in C12 i have three sheet names like Sheet1, sheet2,
sheet3

When i reach C13 i have to check whther the name I
entered already exixts in the specific sheet ie. for eg.
if my C12 contains sheet2 i want to check the name
entered in C4 already exixts in Sheet2 Range A1 thru end
of list (dynamic)

If the name exists then msg box alerting and select c4 ..

Hoew can I code this?

is it possible to do it other than in Worksheet_Change or
Worksheet_SelectionChange since i have several code
already there?
just call this macro from there?
I have already some code based on my selection of C13.
i want to check this one also while i am in C13

any help?

TIA
Soniya



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
How to check to see if a sheet with a particular name exists? Varun Excel Worksheet Functions 3 January 25th 09 01:41 PM
check if sheet exists mohavv Excel Discussion (Misc queries) 1 November 21st 07 01:58 AM
do not copy data to another sheet if exists Paul Excel Worksheet Functions 1 November 2nd 06 08:48 PM
check if the sheet/tag exists Alex Excel Worksheet Functions 2 March 14th 06 08:58 PM
check if sheet exists Ross[_6_] Excel Programming 3 July 25th 03 06:46 PM


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