#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default free cell

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the worksheet.

--
Gary''s Student
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,081
Default free cell

check the cell's Dependent property

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the worksheet.

--
Gary''s Student

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default free cell

thanks
--
Gary''s Student


"Duke Carey" wrote:

check the cell's Dependent property

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the worksheet.

--
Gary''s Student

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default free cell

Dim fEmpty
Dim tmp As Range
fEmpty = IsEmpty(ActiveCell)
If fEmpty Then
On Error Resume Next
Set tmp = ActiveCell.DirectPrecedents
On Error GoTo 0
If Not tmp Is Nothing Then
fEmpty = False
End If
On Error Resume Next
Set tmp = ActiveCell.DirectDependents
On Error GoTo 0
If Not tmp Is Nothing Then
fEmpty = False
End If
End If


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary''s Student" wrote in message
...
How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the

worksheet.

--
Gary''s Student



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default free cell

Thank you Bob, for both the answer and the general approach of using On
Error. I will use this in the future instead of my (Homer Simpson) usual
practice of banging my head into a wall until a 1004 error pops up.
--
Gary's Student


"Bob Phillips" wrote:

Dim fEmpty
Dim tmp As Range
fEmpty = IsEmpty(ActiveCell)
If fEmpty Then
On Error Resume Next
Set tmp = ActiveCell.DirectPrecedents
On Error GoTo 0
If Not tmp Is Nothing Then
fEmpty = False
End If
On Error Resume Next
Set tmp = ActiveCell.DirectDependents
On Error GoTo 0
If Not tmp Is Nothing Then
fEmpty = False
End If
End If


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary''s Student" wrote in message
...
How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the

worksheet.

--
Gary''s Student






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default free cell

or just use the Find Dependents tool on the Audit toolbar!

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the worksheet.

--
Gary''s Student

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default free cell

Some of still use 2000 <vbg

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"John Lyons" wrote in message
...
or just use the Find Dependents tool on the Audit toolbar!

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the

worksheet.

--
Gary''s Student



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,081
Default free cell

Trace Dependents/Precedents icons are available in 2000 (and '97, I think)
when you customize the toolbar & look in the Tools category<g


"Bob Phillips" wrote:

Some of still use 2000 <vbg

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"John Lyons" wrote in message
...
or just use the Find Dependents tool on the Audit toolbar!

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the

worksheet.

--
Gary''s Student




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default free cell

You are right, I had forgotten since I never use them, and was thinking of
the much stronger Evaluate facility in the XP Auditing tool <g

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Duke Carey" wrote in message
...
Trace Dependents/Precedents icons are available in 2000 (and '97, I think)
when you customize the toolbar & look in the Tools category<g


"Bob Phillips" wrote:

Some of still use 2000 <vbg

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"John Lyons" wrote in message
...
or just use the Find Dependents tool on the Audit toolbar!

"Gary''s Student" wrote:

How can I tell if a cell is free (available)?
Free would mean empty and not referred to by another cell on the

worksheet.

--
Gary''s Student






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
EARN,20000$ & ALL TYPES SOFTWARE FREE DOWNLOAD,& KATRINA KAIF OPENVIDEOS & WEBSITE DEV TO FREE ALL OVER THE WORLD`S PEOPLE SAI BABA Excel Worksheet Functions 0 January 25th 09 01:10 PM
Free social world wide network pays for 10 generations! Free! alabatros1 Excel Discussion (Misc queries) 0 November 15th 08 09:52 PM
Where free 2 sigma statistical process control chart, free? Blankenh Charts and Charting in Excel 0 January 16th 08 10:28 PM
Free rotate cell content? Saint Excel Discussion (Misc queries) 6 June 19th 05 03:26 PM
Free books on Charting, Basics, Data Management, Functions; Free Add-In "Excel Usability Enhancer" VJ[_3_] Excel Programming 0 December 11th 03 09:01 AM


All times are GMT +1. The time now is 10:17 PM.

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"