Complicated Match/Lookup in between dates formula?

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
10,302
Office Version
2007
Platform
Windows
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.
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

jwillits

New Member
Joined
Jul 10, 2018
Messages
24
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.
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
10,302
Office Version
2007
Platform
Windows
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.
 

jwillits

New Member
Joined
Jul 10, 2018
Messages
24

tico_ocit

New Member
Joined
Apr 5, 2019
Messages
16
"*" 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?
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
10,302
Office Version
2007
Platform
Windows
So the "*" works as entering another IF in the 'True' section?
it is right.
Boolean logic says:
* = and
+ = or
 

Watch MrExcel Video

Forum statistics

Threads
1,090,549
Messages
5,415,219
Members
403,572
Latest member
ballardgirl

This Week's Hot Topics

Top