Hi, have you even tried searching the forum? There are similar questions that have been asked (and answered) which you could adapt to your needs with a little macro editing.
I suggest you also include the Excel version and OS you're using
Hi Keebellah
I wondered if you could assist again, I have managed to get the vba code working for my spread sheet, it alerts me when cells in a column = 30, however I am trying to get it to check the same column in each sheet, it only does the first sheet. I have tried different additions to the code but cannot get it to work correctly
No problem, but without the file (make sure to attach it with non-private data and invalid email addresses) it's hard to explain.
You can of course add a loop to check eacg worksheet that needs to be checked, and the column checking remains the same, but, without the file, It's easier to show than explain
Okay, here's the corrected code for any number of worksheets that have the saem lay-put and starting with able rows on row 8.
It has an extra check to see if row 7 is the correct header, checking if C contains asset number and D dispatch ....
All checked in lowercase just in case.
Hope this does the job
Hi Keebellah
It works perfectly, I will add the data in that I took out for security and run it again
Many thanks for your help again, very much appreciated
I do have some points that you should pay attention to.
There is no check if there is a (valid) email address in the email column and maybe you should also add checks if the asset number is not empty, and things like that.
Once you have code like this and you want it to run without a hitch then you should be prepared for issues that may disrupt the process.
You already have the Reminder sent but you could also use this cell to enter something like Invalid or missing email address or something else, then you will also have to change the check to sent the email, instead of <> "Mail" you could say <> "" that means there is nothing in that cell.
Think about it.
I separated the sending part so that you can use it for other processes, just pass the parameters and the module can be used with other macros.
I also added a check if the email cell is not empty
Hi Keebellah
I have added some more sheets to the workbook, for some reason the code doesn't work on the new sheets, I have looked through the code but cant work out why, could you shed any light, maybe its something simple I am missing
Have to go out now but this will work (I hope)
However you made the mistake to think that all the tables started on the same row, thta's why in most cases it did not work you check ROW 5 for the headers while most are ROW 6, that was the first one.
Furher on not everey row 8 was the firts row of data,
I modified the file and hope it works.
There is a global variable set in the module where it is set testing = True
So no mail will be sent just displayed and saved as draft
When you have all checked out the just set testing = False and the mails will be send if found
You're welcome, it's great when a solution actually solves the issue
Status
Not open for further replies.
You have insufficient privileges to reply here.
Related Threads
?
?
?
?
?
Tech Support Guy
9.9M posts
859.7K members
Since 1998
A forum community dedicated to tech experts and enthusiasts. Come join the discussion about articles, computer security, Mac, Microsoft, Linux, hardware, networking, gaming, reviews, accessories, and more!