Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default VBA "Excel & Outlook" **************

Hi everyone,

I am having lots of difficulties with tonnes of data on back of my
head.
Basically, I have about 120 outlook emails saved on my drive. Each
email file obviously have different names.

Q: what I am trying to achieve is to be able to paste all the emails
to seperate worksheets in one workbook or look up or whatever case may
be,
Looking up values on cells A1 to A50 on activesheet on all emails then
returning the name of email that has the value on the next column B1
to B50.


What I can do now so far with help from wonderful people here in
google groups is this;

- Searching through entire worksheets for values listed from cell A1
to A50, if value is found then displaying the name of the particular
worksheet or worksheets on B1 to B50


Sub SearchAllSheets()

For i = 1 To 50
If Range("A" & i) < "" Then
Range("B" & i).ClearContents
For Each sh In Worksheets
If sh.Name < ActiveSheet.Name Then
Set searchresult = sh.Cells.Find(Range("A" & i), _
lookat:=xlPart)
If Not searchresult Is Nothing Then
Range("B" & i) = Range("B" & i) & " " & " | " & sh.Name
End If
End If
Next
End If
Next


End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default VBA "Excel & Outlook" **************

hi James,
you need a macro to import all your emails in different sheets of a
workbook.
use the macro-recorder to record the import of one email.
post your code here to create a loop for all emails (are they in the
same directory?)

stefan


On 21 Mai, 09:15, James8309 wrote:
Hi everyone,

I am having lots of difficulties with tonnes of data on back of my
head.
Basically, I have about 120 outlook emails saved on my drive. Each
email file obviously have different names.

Q: what I am trying to achieve is to be able to paste all the emails
to seperate worksheets in one workbook or look up or whatever case may
be,
Looking up values on cells A1 to A50 on activesheet on all emails then
returning the name of email that has the value on the next column B1
to B50.

What I can do now so far with help from wonderful people here in
google groups is this;

- Searching through entire worksheets for values listed from cell A1
to A50, if value is found then displaying the name of the particular
worksheet or worksheets on B1 to B50

Sub SearchAllSheets()

For i = 1 To 50
If Range("A" & i) < "" Then
Range("B" & i).ClearContents
For Each sh In Worksheets
If sh.Name < ActiveSheet.Name Then
Set searchresult = sh.Cells.Find(Range("A" & i), _
lookat:=xlPart)
If Not searchresult Is Nothing Then
Range("B" & i) = Range("B" & i) & " " & " | " & sh.Name
End If
End If
Next
End If
Next

End Sub


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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
"LabelColor" an appointment in Outlook with VBA in Excel. Mark Rosenkrantz[_3_] Excel Programming 3 July 27th 04 07:00 PM
Creating "Plain Text" mail message in Outlook from Excel VBA Shane Excel Programming 5 December 17th 03 05:10 PM


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