Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell: try to find if anydata exists in sheet

Status
Not open for further replies.

azzi2000

MIS
Jan 28, 2004
145
US
This should be simple.

I am importing outside data to a spreadsheet SheetOrg,
then based on some criteria I distribute data from SheetOrg to sheetA,sheetB, sheetC...
After All done I want to erase sheetOrg if nothing is in it or Display a warning message for data failure if data exists in SheetOrg.

Is there a function to check if data exists in worksheet ?
Please advice,
Thank you.
Dré
 

Hi,

Take a look at the UsedRange property.

if there is no data, then the count property must be 1 AND the value property must be "".

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
how can I do that,
I use Cell.select but do not know how to use the count ?
Please advice,
Thank you
Dré
 
A starting point:
ActiveSheet.UsedRange.Cells.Count

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

Look at the UsedRange property of the sheet

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top