Pls help! How can i direct and open a file based on the value in the cells?

htoh2

New Member
Joined
Oct 20, 2010
Messages
25
Greetings to the expert!


I'm a novice in visual basic macro and would like to seek help from the experts. Pls kindly help me with it, thank you in advance.

These are some sample data:

In my source.xls, i have 2 columns of data with value as shown below:


Functions | Business Positions
Procurement Manager



And i want a macro that runs like that:

When the value e.g. in range("A2") under column "Functions" = "Procurement"
AND values e.g. in range ("B2") under column "Business Positions" = "Manager"

THEN, it will direct to the workbook procurement.xls

I had tried to use IF..ELSE statement but to no avail.

Please guide me on this.
Thank you very much ;)

Your help will be greatly appreciated :)

Best regards,
htoh2
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi, thank for your quick response :)

This is my full path to the document:

C:\Documents and Settings\htoh2\Desktop\BookA.xls

Thank you for your kind assistance;)

Best regards,
htoh2
 
Upvote 0
Hi

Sorry for my mistake!

It was my mistake. It should be C:\Documents and Settings\htoh2\Desktop\procurement.xls

By the way, the problem is solved!

thank for your kind attention once again. :)


Regards,
htoh2
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,948
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top