Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default linked cells loop?

Dim rng as Range
Dim rng1 as Range
Dim cell as Range

On Error Resume Next
set rng = Cells.Specialcells(xlformulas)
On Error goto 0
if not rng is nothing then
for each cell in rng
if instr(1,cell.formula,"!",vbTextcompare) then
' run code
' the below can be used to check if it is getting the right cells
if rng1 is nothing then
set rng1 = cell
else
set rng1 = union(rng1,cell)
end if
end if
Next
if not rng1 is nothing then
rng1.Select
End if
End if

--
Regards,
Tom Ogilvy


"Johnny Base" wrote in message
...
Hmmm Here is an example of linked cell in the definition that I am using:

In sheet1 I have "hehe" in A1
In sheet2, I have "='sheet1'!A1" in A3 and A3 shows "hehe"

I am unsure on how to explain it without an example....hope that clears

things up....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default linked cells loop?

Thank you Tom... It was great 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
Sorting non-linked cells in a linked worksheet Gary Excel Discussion (Misc queries) 1 October 25th 08 03:38 AM
Linked Cells Staying With Cells Once Linked Workbook Update. [email protected] Excel Worksheet Functions 0 June 6th 06 09:32 AM
linked cells loop? Tom Ogilvy Excel Programming 0 April 2nd 04 05:36 PM
VBA loop cells Adrie Rahanra Excel Programming 1 September 30th 03 10:22 AM
How to loop through cells in macro Andrew[_21_] Excel Programming 1 September 8th 03 08:21 PM


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