# H-Lookup and Dates

#### JRegal

##### New Member
Any help is appreciated!

I am using the following H-Lookup Formula to search for values that match with a certain date in sheet1 and move it to sheet2. Where I then shift it either left or right by C2 = one of the following #'s (-3,-2,-1,0,1,2,3,4) depending on the day I want my value to show up on.

=HLOOKUP(D4-\$C\$2,Sheet1!\$D\$5:\$M\$6,2,0)

My current set up looks like this:

Dates: l 9/19/14 l 9/20/14 l 9/21/14 l 9/22/14
Values: HK299

The issue I run into is when I change the days (C2) say to a plus 1 it shifts my value "HK299" from Friday (9/19/14) to Saturday (9/20/14) but I would like it to skip over Saturday and Sunday and shift under Monday (9/22/14). Also would like it skip over holidays i assign.

Any help or suggestions is appreciated.

Thanks,

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

#### FormR

##### MrExcel MVP
Hi, try:

=HLOOKUP(WORKDAY(D4,\$C\$2,holiday),Sheet1!\$D\$5:\$M\$6,2,0)

Substitute "holiday" for a range of cells that contain the holiday dates you want to exclude.

#### JRegal

##### New Member
Awesome! Thanks for your help. Works great!

Replies
2
Views
148
Replies
4
Views
220
Replies
2
Views
120
Replies
1
Views
55
Replies
6
Views
398

1,191,584
Messages
5,987,493
Members
440,097
Latest member
Wint

### 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.

### Which adblocker are you using?

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

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