# find the date

#### sony

##### Board Regular
hi
I want to know the formula that will lookup criteria of weekday (B1) and refer my inpnut date (A4), then it will return the next closest date of the weekday I set.

Myabe i cannot explain clearly, let's see my table and return column is the date I want excel to return. Can a simple formula do that for me? thank you
Book1
ABCD
1CutWed
2
3inputreturn
48-Oct9-Oct
59-Oct9-Oct
610-Oct16-Oct
7
Sheet1

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
There must be easier ways to do it than this, but it's the first thing I came up with. Uses a lookup table to associate your 'Wed' etc entries with numbers:

=IF(WEEKDAY(A4,2)<(VLOOKUP(\$B\$1,\$F\$1:\$G\$7,2,0)+1),A4-WEEKDAY(A4,2)+VLOOKUP(\$B\$1,\$F\$1:\$G\$7,2,0),A4-WEEKDAY(A4,2)+VLOOKUP(\$B\$1,\$F\$1:\$G\$7,2,0)+7)

See the example:
Book2
ABCDEFG
1Cut:WedLookup:Mon1
2Tue2
3inputReturnWed3
48-Oct9-OctThur4
59-Oct9-OctFri5
610-Oct16-OctSat6
729-Oct30-OctSun7
830-Oct30-Oct
931-Oct6-Nov
10
Sheet1

Seems to work...

This message was edited by PaddyD on 2002-10-03 02:31

Replies
8
Views
824
Replies
5
Views
413
Replies
6
Views
347
Replies
8
Views
328
Replies
28
Views
1K

1,218,746
Messages
6,144,264
Members
450,533
Latest member
xoxo1998

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