Go to previous date if no mach found

Jd1uth

New Member
Joined
Sep 17, 2024
Messages
12
Office Version
  1. 2013
Platform
  1. Windows
Hallo i use this code =ALS.NB(VERT.ZOEKEN(A1;Planning!$A$2:$S$100074;3;ONWAAR);0) to search for a date
if date found do something on sheet 3 this works fine when date match
on the sheet (Planning) to search I have a week calendar
i use date +7 for a workweek
28-9-2024 (Monday)
blank cell
blank cell
blank cell
blank cell
3-10-2024 (Monday)
is it possible if date not match search or cell is blank to go back to previous date
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Have you tried changing your lookup to True rather than False?

Btw you should really post your formula in English on this forum
 
Upvote 0
yes but that make,s no different I am also missing the weekend dates be course of the 5 workdays so in the weekend there is a 0 be course there is no date found
that way i think he shoot look for the previous date
 
Upvote 0
yes but that make,s no different
That is a very strange result you are getting if you don't have an exact match using TRUE and FALSE in VLOOKUP (see below) and blank cells.
in the weekend there is a 0
In your first post you say there are blank cells between the dates, a 0 is not a blank cell, which is it?
Perhaps you need to post your actual data using XL2BB.

BTW, neither of the dates you posted is a Monday

Book1
ABCDEFG
828/09/2024
907/10/2024#N/A
1005/10/2024
11
12
13
1405/10/2024
15
16
17
18
19
2012/10/2024
Sheet1
Cell Formulas
RangeFormula
D9D9=TODAY()+9
G9G9=VLOOKUP(D9,A8:A20,1,FALSE)
G10G10=VLOOKUP(D9,A9:A21,1,TRUE)
A14,A20A14=A8+7


For anyone reading this thread the formula in post 1 in English is
Excel Formula:
=IFNA(VLOOKUP(A1,Planning!$A$2:$S$100074,3,FALSE),0)
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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