To All,
First time poster and complete VBA Newbie.....so please be patience with me! I DO want to learn this, but I don't know where to start!!!!
Here's what I've been asked to do in Excel using VBA:
Take 2 separate tables, compare a string of data in 1st table, then bounce that information against a 2nd table and see if a certain condition exists. If it does then mark it in the 1st table, and then do the same for the rest of the data set in the first table. Note: Data Tables are dynamic from month-to-month with regards to the number of records/rows that need to be scrubbed.
Below is the pseudo-code I've written
The process is roughly as follows:
Scan Table 1 - 'Requests for Work' by Person, Role, Project and Hours Requested, then
Scan Table 2 - 'Availability' by Person, Role, and Hours Available, and see if either of the three conditions exist:
If the person being requested has available hours in the month (using Table 1) as compared to table 2,
Then, subtract those hours from the total monthly available hours and, then update the hours now left available for employee in a particular month, and mark Request as 'Satisfied', ELSE
If the the person being requested is for 0 hours (for a particular project/month),
Then mark row/field in Request Table as satisfied and move to the next request, ELSE
If the person being request does NOT have the exact number of hours requested,
Then, simply leave request row field where a 'Satisfied' response would typically go as a 'blank', or populate with 'unfilled' for that particular person,
Then Step thru every other person in the Availability Table and determine If any other person with the same Role has the necessary available time
Then, subtract those hours from the total monthly available hours and, then update the hours now left available for employee in a particular month, and mark Request as 'Satisfied'
Go on to the next request
At the end of this process all the requests should either have a 'Satisfied', or a blank label
PLEASE NOTE: I am not expecting anyone here to write the code out for me, but rather give me guidance on how to best to proceed. I have a little bit of programming experience, but need some direction on how best to proceed.
Bookmarks