Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Grey Fill for all cells that contain a certain string in hyperlinkaddress

Dear Experts:

I would like to achieve the following using a macro:

I got a workbook with several sheets. Most of the cells of these
worksheets contain hyperlink addresses.

The requirements for the macro are as follows:

Format all cells of all the worksheets with a grey fill where the
hyperlink address contains the string '%20'.

I am referring to the actual hyperlink address NOT the displayed
name.

Help is much appreciated. Thank you very much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Grey Fill for all cells that contain a certain string inhyperlink address

On Aug 2, 3:30*am, andreashermle wrote:
Dear Experts:

I would like to achieve the following using a macro:

I got a workbook with several sheets. Most of the cells of these
worksheets contain hyperlink addresses.

The requirements for the macro are as follows:

Format all cells of all the worksheets with a grey fill where the
hyperlink address contains the string '%20'.

I am referring to the actual hyperlink address NOT the displayed
name.

Help is much appreciated. Thank you very much in advance.


Sub HyperlinksInteriorColorIndexSAS()
Dim i As Long
Dim H As Hyperlink
For i = 1 To Worksheets.Count
For Each H In Sheets(i).Hyperlinks
If InStr(H.Address, "%20") Then
. MsgBox H.Range.Address
Sheets(i).Range(H.Range.Address).Interior.ColorInd ex = 15
End If
Next H
Next i
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Grey Fill for all cells that contain a certain string inhyperlink address

On Aug 2, 3:30*am, andreashermle wrote:
Dear Experts:

I would like to achieve the following using a macro:

I got a workbook with several sheets. Most of the cells of these
worksheets contain hyperlink addresses.

The requirements for the macro are as follows:

Format all cells of all the worksheets with a grey fill where the
hyperlink address contains the string '%20'.

I am referring to the actual hyperlink address NOT the displayed
name.

Help is much appreciated. Thank you very much in advance.


Sub HyperlinksInteriorColorIndexSAS()
Dim i As Long
Dim H As Hyperlink
For i = 1 To Worksheets.Count
For Each H In Sheets(i).Hyperlinks
If InStr(H.Address, "%20") Then
MsgBox H.Range.Address
Sheets(i).Range(H.Range.Address).Interior.ColorInd ex = 4
End If
Next H
Next i
End Sub
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Grey Fill for all cells that contain a certain string inhyperlink address

On 2 Aug., 15:22, Don Guillett Excel MVP
wrote:
On Aug 2, 3:30*am, andreashermle wrote:





Dear Experts:


I would like to achieve the following using a macro:


I got a workbook with several sheets. Most of the cells of these
worksheets contain hyperlink addresses.


The requirements for the macro are as follows:


Format all cells of all the worksheets with a grey fill where the
hyperlink address contains the string '%20'.


I am referring to the actual hyperlink address NOT the displayed
name.


Help is much appreciated. Thank you very much in advance.


Sub HyperlinksInteriorColorIndexSAS()
Dim i As Long
Dim H As Hyperlink
*For i = 1 To Worksheets.Count
*For Each H In Sheets(i).Hyperlinks
*If InStr(H.Address, "%20") Then
* MsgBox H.Range.Address
* Sheets(i).Range(H.Range.Address).Interior.ColorInd ex = 4
*End If
Next H
Next i
End Sub- Zitierten Text ausblenden -

- Zitierten Text anzeigen -


Hi Don,

Great, exactly what I wanted. Thank you very much for your
professinal help.

Regards, Andreas
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Grey Fill for all cells that contain a certain string inhyperlink address

On Aug 3, 1:11*am, andreashermle wrote:
On 2 Aug., 15:22, Don Guillett Excel MVP
wrote:





On Aug 2, 3:30*am, andreashermle wrote:


Dear Experts:


I would like to achieve the following using a macro:


I got a workbook with several sheets. Most of the cells of these
worksheets contain hyperlink addresses.


The requirements for the macro are as follows:


Format all cells of all the worksheets with a grey fill where the
hyperlink address contains the string '%20'.


I am referring to the actual hyperlink address NOT the displayed
name.


Help is much appreciated. Thank you very much in advance.


Sub HyperlinksInteriorColorIndexSAS()
Dim i As Long
Dim H As Hyperlink
*For i = 1 To Worksheets.Count
*For Each H In Sheets(i).Hyperlinks
*If InStr(H.Address, "%20") Then
* MsgBox H.Range.Address
* Sheets(i).Range(H.Range.Address).Interior.ColorInd ex = 4
*End If
Next H
Next i
End Sub- Zitierten Text ausblenden -


- Zitierten Text anzeigen -


Hi Don,

Great, exactly what I wanted. *Thank you very much for your
professinal help.

Regards, Andreas- Hide quoted text -

- Show quoted text -


Glad to 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
NEED TO FILL BLANK CELLS IN DATA WITH TEXT STRING Stewcrew Excel Worksheet Functions 8 January 16th 11 05:48 AM
Fill Colour Prints as Grey Mikek Excel Discussion (Misc queries) 2 May 19th 07 07:37 PM
NEED TO FILL BLANK CELLS WITH TEXT STRING Stewcrew Excel Discussion (Misc queries) 1 May 17th 07 01:10 AM
How to get a lighter shade of grey for fill color? LurfysMa New Users to Excel 2 March 14th 07 04:38 AM
Can I count how many grey-filled cells are in a row ? AnthonyG Excel Worksheet Functions 1 February 4th 05 10:08 AM


All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"