Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello I would like to be able to loop through all values in row a, find
all that have a hyperlink present and then copy these values into a new worksheet. This is what i have so far: Sub SameData() Dim n As Integer, i As Integer Dim int_Unit As Integer int_Unit = Sheets("Industry").UsedRange.Rows.Count n = 1 Do While Not IsEmpty(Sheets("Industry").Cells(n, 1)) For i = 1 To int_Unit If Sheets("Industry").Cells(n, 1) = ActiveCell.Hyperlinks.Count Then Sheets("newsheet").Cells(n, 2) = Sheets("Industry").Cells(i, 1) End If Next i n = n + 1 End Sub The error i get is 'Do without Loop' could someoen improve this code to do what i think is essentially a simple code. thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, works perfectly.
Another question.. would it be possible to copy to another worksheet all fields that ARENT hyperlinks? or would the best way be just to delete the hyplerlinks with Sheets("Industry").Cells(n,1).Hyperlinks.Delete ? is that right cheers tom |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I guess it depends on what you really want as the end result.
You can do Sheets("Industry").Hyperlinks.Delete and this will delete the hyperlinks, but won't delete what is displayed in the cells (nor will your suggestion). -- Regards, Tom Ogilvy wrote in message oups.com... Thanks, works perfectly. Another question.. would it be possible to copy to another worksheet all fields that ARENT hyperlinks? or would the best way be just to delete the hyplerlinks with Sheets("Industry").Cells(n,1).Hyperlinks.Delete ? is that right cheers tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying hyperlinks | Excel Discussion (Misc queries) | |||
Copying Hyperlinks | Excel Discussion (Misc queries) | |||
finding all link, hyperlinks in a workbook | Excel Discussion (Misc queries) | |||
hyperlinks and copying a worksheet | Excel Worksheet Functions | |||
copying hyperlinks | Excel Programming |