Hi, was wondering if anyone could help me with this little problem.
I have a spreadsheet containing various data and on one of the columns is a list of companies. This number of companies is not particularly large and each company is alligned to a specific team. There are about 4000+ rows of data.
I'm at the end of my code (which has removed unnecessary entries and sorted those that remain (but unfortunately this is not by company for reasons that are just not with explaining!) and the last thing I want the spreadsheet to do is add into the final column the name of the team that deals with the company. The company/team list is kept on a separate spreadsheet (in fact the workbook containing the company/team list contains all the code, the spreadsheet that it works upon contains no code which is exactly how I need it).
The problem is because of the many ways my idiot colleagues write the company name i'm not going to get an exact match and it's virtually impossible (for me!) to get Excel to work it out.
HOWEVER, I wanted the spreadsheet to do the following: -
1) When an unrecognised company is identified, open a userform displaying the company name, with X number of buttons with the team names on
2) When the team button is pressed, not only is the data table updated with the correct team but also the company/team list updated to include "yet another damn variation of how to spell the same company name"
Trouble is, I cant figure out the relationship with my code and the userform to do this. If it helps, the last part of my code is: -
[vba]
For N = 1 To FinalRow
If WStarget.Rows(N).Font = 1 Then
ThisWorkbook.Activate
Worksheets("Sheet1").Cells(5, 7).Select
Do
If ActiveCell = WStarget.Cells(N, 6) Then
WStarget.Cells(N, 7) = ActiveCell.Offset(0, -1)
Exit Do
Else
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell)
' NOW I NEED THE CODE FOR THE USERFORM TO OPEN,
'GET THE CORRECT TEAM VIA USER INPUT,
'UPDATE ALL RELEVANT LISTS,
'CLOSE AND THEN CONTINUE THE FOR LOOP.
'NOTE: I WANT IT TO DO THIS FOR COMPANY NAMES IN BLACK FONT ONLY.
[/vba]
Any ideas????
All comments would be greatly appreciated....including "Replace your colleagues" (and I've seriously thought of doing that!)
Thanks.