Thread
:
Loop through columns and then rows
View Single Post
#
4
Posted to microsoft.public.excel.programming
Nick Hodge
external usenet poster
Posts: 1,173
Loop through columns and then rows
Yes, although the entire sheet will take some time, you will need to change
the line to
myCell.Hyperlinks.Delete
Although if that is what you are looking to do the this would be better to
kill hyperlinks
Sub killhyperlinks()
Cells.Hyperlinks.Delete
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS
"Sunryzz" wrote in message
...
Will it work to preselect the whole sheet or the first three columns
(since
that's where the hyperlinks are that I need to get rid of)? Also, if I
use
myCell.Value.hyperlink.delete
This is similar to what I'm doing now, except I'm using activeCell.
"Nick Hodge" wrote:
Iterations are often simpler if you pre-select the data. If this is
possible the code below will run along the rows and then down the columns
changing what is in the cell to only the first three characters.
If you cannot pre-select, post back
Sub IterateSelection()
Dim myCell As Range
For Each myCell In Selection
myCell.Value = Left(myCell.Value, 3)
Next myCell
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS
"Sunryzz" wrote in message
...
I have a spreadsheet that needs the text in 2 columns to be altered. I
would
like to do the whole spreadsheet with a macro and the number of rows
changes.
I have set up a macro that works if I click in the top cell of each
column,
but I would like to be able to click in the first cell and have it fix
that
cell and then go to the next column and fix it, next column and fix it,
etc
until it reaches the end of the row. Then it would need to move down
to
the
next row and do the same thing. It would do this until it encountered
a
blank row. The task necessary to fix the cell is not one where I can
highlight the whole row; it only works on a single cell at a time.
Does
anyone have a good bit of code that would work well for this
application?
Thanks so much!
Reply With Quote
Nick Hodge
View Public Profile
Find all posts by Nick Hodge