LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Check relative / absolute references

In my opinion:
for checking column A, that would pretty much be it. You could narrow it
down to only look at cells with formulas by using specialcells, but for
absolute and relative, checking the formula string would be required. As
for searching for a name, seeing if the formula string contained the name
would be as good as any.

--
Regards,
Tom Ogilvy

"oli" wrote in message
...

Hello,

I want to find the cells with absolute reference and the ones without
abolute reference.

I tried this way (seems to work ...):


Option Explicit

Sub check_ref()
Dim vAnzZeilen As Long, vZnr As Long
Dim vInCell As String
vAnzZeilen = Worksheets(1).UsedRange.Rows.Count
MsgBox "rows: " & vAnzZeilen

For vZnr = 2 To vAnzZeilen
vInCell = Worksheets(1).Cells(vZnr, 1).FormulaLocal
' check content of the cell
If InStr(vInCell, "$") Then
Debug.Print vInCell & ": absolute"
Else
Debug.Print vInCell & ": relative"
End If
Next vZnr
End Sub

Is there a better way (function or method) to do this.

I would like to do the same check to find which cells refenrences a
name.

Thanks.

Olivier


--
oli
------------------------------------------------------------------------
oli's Profile:

http://www.excelforum.com/member.php...o&userid=24000
View this thread: http://www.excelforum.com/showthread...hreadid=384474



 
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
absolute & relative references zzulu4 Excel Discussion (Misc queries) 2 April 1st 09 05:54 PM
Something other than Absolute, Relative or Mixed references veryeavy Excel Discussion (Misc queries) 16 January 7th 09 12:46 AM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
how to switch between relative and absolute references KeKe New Users to Excel 2 June 9th 06 05:23 PM
Absolute vs. Relative Cell References ChrisR Excel Programming 2 February 9th 05 11:16 PM


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