VBA Lotus notes

The below code determines the name of a file based on inputs from excel in cells N5 & O5

N5 is now ambiguous - it could be either CMB-LC or CMB MME

But the good news is it can be hardcoded, it will only ever be them two

So instead of using Cells(5, 14).Value to determine the next part of the file name, can the code check the str and either CMB-LC or CMB-MME and the month that gets found by (" & Format(Cells(5, 15).Value, "mmm-yy")

So John Smith could have either or both the below below or one of them

Smith, John CMB-LC (Jan-15) - Managed region .pdf and/or
Smith, John CMB-MME (Jan-15) - Managed region .pdf


   stfilename1 = str & " " & Cells(5, 14).Value & " (" & Format(Cells(5, 15).Value, "mmm-yy") & ") - Managed Region .pdf"
    stfilename2 = str & " " & Cells(5, 14).Value & " (" & Format(Cells(5, 15).Value, "mmm-yy") & ") - Managed .pdf"
    stfilename3 = str & " " & Cells(5, 14).Value & " (" & Format(Cells(5, 15).Value, "mmm-yy") & ") - Booked .pdf"

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is a bit confusing. The title refers to Lotus Notes, but the content refers to Excel.

Also, it is hard to understand what problem you have. Your code to include the value of N5/Cells(5,14) in the concatenation should work whatever the value on the cell.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seamus2626Author Commented:
Yep, you jogged my memory!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.