VBA if question

asreid2527

New Member
Joined
Feb 14, 2010
Messages
2
I am trying to use VBA to input a value into a cell on sheet1 based on criteria but have no idea how to do this. Here is the case scenario:

Sheet1: (Contains call data including the extension number in one column and the date the call came in on that extension in another column.)

Sheet2: Contains the list of extensions with the assigned employee and the start and end date of the employee).

I can't just do a vlookup on this since the extension is listed multiple times in the same column on sheet 2 with different employees (same extension is used when a new employee starts).

I would assume an if statement would be used such as:

if sheet1 row 1 date is between sheet2 start and end date and sheet1 extension = sheet2 extension, then input the employee name(stored from sheet2) into sheet1 row X1.

Any help on this would be greatly appreciated!

Thanks
 

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.

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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