# Thread: Complicated Match/Lookup in between dates formula? Thanks: 0 Likes:  2 Post #5326585 (1)Post #5327155 (1)

1. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by jwillits
Here is the actual data from my workbook. Note that this info is contained on different pages. In this case, could you write the formula trying to get the Related Weekly Spend number from Sheet2 into the column on Sheet1?

The rules are the same as that I need the Tracking Number to Match from Sheet1 to Sheet2, and then I need the Date in Sheet1 to fall between the Date of the Matching Tracking Number. If there is none, I need it to go to the date range before it.
To continue with the formula, it is important to answer the following:

It is always the previous date.
In an example.
If the date is 25may, the ranges are
a) 1apr - 20apr
b) 26may - 31may
So what is the corresponding range a) or b)?

The nearest date is 26may, but do you want the previous date?

---------------------------------------------

To adapt the formula to rows and columns and sheets, you could upload your file.

You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

2. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by DanteAmor
To continue with the formula, it is important to answer the following:

It is always the previous date.
In an example.
If the date is 25may, the ranges are
a) 1apr - 20apr
b) 26may - 31may
So what is the corresponding range a) or b)?

The nearest date is 26may, but do you want the previous date?

---------------------------------------------

To adapt the formula to rows and columns and sheets, you could upload your file.

You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

A would be correct, I need the nearest previous date, only if it is not between a set of dates.

3. ## Re: Complicated Match/Lookup in between dates formula?

To adapt the formula to rows and columns and sheets, you could upload your file.

You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

4. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by DanteAmor
To adapt the formula to rows and columns and sheets, you could upload your file.

You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

https://www.dropbox.com/home?preview=Sample+Data.xlsx

5. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by DanteAmor
"*" is a nested if.

if (condition, if (condition, true))
or
if (condition * condition, true)

"," or ";" It is the argument separator that you have configured by region.
So the "*" works as entering another IF in the 'True' section?

6. ## Re: Complicated Match/Lookup in between dates formula?

Couldn't download because asks for a login, although I think DanteAmor will find a solution for you.

7. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by tico_ocit
So the "*" works as entering another IF in the 'True' section?
it is right.
Boolean logic says:
* = and
+ = or

8. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by DanteAmor
it is right.
Boolean logic says:
* = and
+ = or
Nice! Didn't know! Always learning something! Thank you!

9. ## Re: Complicated Match/Lookup in between dates formula?

Originally Posted by tico_ocit
Nice! Didn't know! Always learning something! Thank you!
In excel you always learn something new.

10. ## Re: Complicated Match/Lookup in between dates formula?

Been using Excel and Access for 13 years, and i am still a beginner

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•