Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to translate: LOOKUP ... WHERE ... IS EQUAL TO .. in Visual Basic

Status
Not open for further replies.

MikeCDPQ

Technical User
Sep 11, 2003
173
CA
Still looking for a VBA script for Excel that will allow me to perform procedure noted in Subject:

This whole procedure splits a gigantic spreadsheet into smaller files and sends off emails to recipient found in Email List.

Here is part of the script:

EmailVendorNo = EmailList.Sheets("List").Range("A" + CStr(j)).Value
If (EmailVendorNo = CurrentVendorNo) Then
Recipient = EmailList.Sheets("List").Range("f" + CStr(j)).Value
Subject = "Report sent Successfully"
End If

j = j + 1

Loop Until EmailVendorNo = CurrentVendorNo Or EmailVendorNo = ""

So far, works perfectly


Now, If a certain VENDORNO from the active workbook is not found in the Email List spreadsheet, I need to LOOKUP the BUYER'S EMAIL ADDRESS (other sheet, same workbook) WHERE the BUYERNO is equal to BUYERNO on Active Workbook.

This will then in turn send an email to the buyer who is made aware that his/her vendor list is not complete.

Anybody has a suggestion. Please make it simple as I am not very familiar with VB

Thanks,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top