Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to Manage Blocked Senders

I have been manually using Excel to manage my Outlook blocked senders
list but it's gotten so large that I want to automate this task. I
thought that I could learn enough VBA to do this on my own but I can't
manage it. If someone would be willing to help, here's what I want to
accomplish:

Given
Worksheet with two columns
Each row represents an email address
Col A has the part of the email address before the @
Col B has the domain
An empty cell in Col A designates the entire domain
Worksheet is sorted in domain order

Goals
Where this worksheet contains multiple addresses from the same domain,
delete duplicate rows and blank col A for the remaining row.

After deleting the dups, I concatenate Col A + "@" + Col B and import
back into Outlook's blocked senders list.

--
Bob Simon
remove both "x"s from domain for private replies
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Macro to Manage Blocked Senders

use this as a starting point

Sub del()

For u = ActiveSheet.UsedRange.Rows.Count To 1 Step -1
For g = ActiveSheet.UsedRange.Rows.Count - 1 To 1 Step -1
If Cells(u, 2).Value = Cells(g, 2).Value Then
jk = Trim(Str(g))
Rows(jk).Select
Selection.Delete Shift:=xlUp
Cells(u, 1).Value = ""
End If
Next
Next

End Sub


"Bob Simon" wrote:

I have been manually using Excel to manage my Outlook blocked senders
list but it's gotten so large that I want to automate this task. I
thought that I could learn enough VBA to do this on my own but I can't
manage it. If someone would be willing to help, here's what I want to
accomplish:

Given
Worksheet with two columns
Each row represents an email address
Col A has the part of the email address before the @
Col B has the domain
An empty cell in Col A designates the entire domain
Worksheet is sorted in domain order

Goals
Where this worksheet contains multiple addresses from the same domain,
delete duplicate rows and blank col A for the remaining row.

After deleting the dups, I concatenate Col A + "@" + Col B and import
back into Outlook's blocked senders list.

--
Bob Simon
remove both "x"s from domain for private replies

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
Emailed Excel Documents keep senders printer settings Andy Excel Discussion (Misc queries) 1 October 29th 08 03:47 PM
Insert Senders Name into Message Body jbjtc Excel Discussion (Misc queries) 0 August 13th 08 01:35 PM
How can I export a document from Excel to yahoo senders ssssssssssdddddddddddddddddddddddddddddd Excel Discussion (Misc queries) 1 May 29th 08 10:13 PM
How do I use the routing feature for multiple senders Gordon McDougall Excel Discussion (Misc queries) 0 December 19th 05 09:13 PM
delete blocked senders messages on receipt why junk mail them? yralih Excel Discussion (Misc queries) 1 July 17th 05 01:09 AM


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