I need a macro solution, and this one is taxing my brain, so I'm appealing to the experts. I've provided examples of two workbooks, "Example.xls" and "Lookup.xls". Ignore the first 29 columns in Example; they represent data unnecessary for this task.
What I'm trying to do is populate columns BL, BM, and BN ("Division", "Purchase/Contract Description", "Vendor/Employee Name") in the "Example" workbook. The other workbook ("Lookup.xls") has three columns; "Lookup#", "Div", and "Name", that I use to pull information from. From that, and from other sources, I fill in the data in Columns BL, BM, and BN. What I can't find results in an #N/A.
Once I'm done, there's cleanup that needs to done for my Travel expenses in L2009 Travel. That's where I'm stuck. There are two tasks I need to accomplish.
The First is: In the LBB_ACCT column, if the acct is "L2009", if the "Descr" field entry begins with "T1001", or says "Travel", "Travel Exp", or "Travel Expense", or says "Reimbursement", "Volunteer Mileage Reimbursement", "Volunteer Reimbursement", or "Volunteer Travel Exp" and the Ln Vendor ID begins with a "2", then the lines are all travel related. For all of these lines I'd like to use the last 9 numbers of the Ln Vendor ID to lookup the Div and Name from my Lookup sheet, and put "Travel Expense" in the "Purchase/Contract Description" field.
The Second is: Some (most) of the lookup numbers for L2009 may not be on my list of numbers. In that case I'd like to pull the name from the LN Vendor Name column, then scan up and down the LN Vendor Name column for the same name. If it's found, pull the Div from column BL for that one and paste to the line I'm working on, put "Travel Expense" in column BM. If it's not found, paste the name from the LN Vendor Name column into column BN, put "Travel Expense" in column BM, and put "#N/A" in column BL.
Whew! I know it's a lot to ask. I start thinking about ways to do it all and my mind goes numb, so any help you can provide is greatly appreciated.
Thanks,
John
Bookmarks