Djblois
07-20-2010, 08:57 AM
This is the code that I have created to determine the company that the report references. It is very straight forward so I do not think I need to explain how it works. However, I am wondering if there is a way to simplify it with elseifs or Select Case or any other way.
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Atalanta Co.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Atalanta"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Camerican International, Inc.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Camerican"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="De medici")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Demedici"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Finica Food Specialties Ltd.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Finica"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Atalanta Co.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Atalanta"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Camerican International, Inc.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Camerican"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="De medici")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Demedici"
GoTo endSub
End If
Set findstring = Range("A" & finalrow(ActiveSheet)).Find(What:="Finica Food Specialties Ltd.")
If Not findstring Is Nothing Then
SaveSetting "BRT", "General", "Current Company", "Finica"
GoTo endSub
End If