find the date

sony

Board Regular
Joined
Jun 15, 2002
Messages
126
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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
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...

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

Forum statistics

Threads
1,144,122
Messages
5,722,604
Members
422,447
Latest member
knopp

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
Top