Excel Changing returned value based off date

GLT07

New Member
Joined
Oct 8, 2018
Messages
2
I have a excel workbook that is filled out daily that I am attempting to make a dashboard out of. One of the challenges I came across is one of my clients change locations or management a lot. I decided to build a "Settings" sheet to document where that client is, what the building is called, client name, the manager, senior manager, and the date the "setting" was changed.

On another sheet I collect all the data from all the clients inputs for each day. What I am trying to do is index match to get the site,building, manager, and senior manager. The issue I am hitting is when the setting is changed, how do I return the correct data for the correct date. Since I have running data it will need to return the same site,building, manager,senior manager until the date matches the setting change date then use that data until the setting is changed again.



Settings
SiteBuildingClientManagerSenior ManagerSetting Changed
Sample Site 1B1Client 1Brandy DoeJohn Doe4/1/2018
Sample Site 1B2Client 2Cindy DoeBob Doe4/1/2018
Sample Site 2B3Client 3Tim DoeJane Doe4/1/2018
Sample Site 2B3Client 4Tim DoeJane Doe4/1/2018
Sample Site 2B3Client 1Brandy DoeJohn Doe5/2/2018
Sample Site 2B3Client 1Time DoeJane Doe5/8/2018

<tbody>
</tbody>


In my example, client 1 changed sites and building on 5/2 and then on 5/8 changes management team.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the MrExcel board!

OK, so you have shown us what the settings sheet looks like, now can you show a small section of the other sheet and what you want returned? The sample should at least include something about Client 1 so we can see just what you are trying to achieve in relation to dates.
 
Last edited:
Upvote 0
Sorry it took awhile for the response, Below I changed some of the settings on the settings sheet to better represent what I am attempting on the Aggregate sheet.

Settings
Changing Dates from original post too better represent what I am attempting below
Site
Building
Client
Manager
Senior Manager
Setting Changed
Sample Site 1
B1
Client 1
Brandy Doe
John Doe
4/1/2018
Sample Site 1
B2
Client 2
Cindy Doe
Bob Doe
4/1/2018
Sample Site 2
B3
Client 3
Tim Doe
Jane Doe
4/1/2018
Sample Site 2
B3
Client 4
Tim Doe
Jane Doe
4/1/2018
Sample Site 2
B3
Client 1
Brandy Doe
John Doe
4/3/2018
Sample Site 2
B3
Client 1
Tim Doe
Jane Doe
4/5/2018

<tbody>
</tbody>



Aggregate Sheet
This sheet combines data from many different sheets but needs to compensate for when clients move or management changes for the clients which is all document on the settings page and the date the change occurred. I have the date on this sheet expanded down to the end of 2019 with formulas for the data expanded down also but returning "" if there is an error. This was when the manual entry sheets are updated with information the aggregate sheet is automatically updated.
(Text in Red comes from several other sheets that is manual entry)
(Text in Blue comes from the setting sheet)
Date
Client
Site
Building
Senior Manager
Manager
Errors From Audit
Orders Audited
Total Trouble Orders
Shipped Orders
4/1/2018
Client 1
Sample Site 1
B1
John Doe
Brandy Doe
2
420
16
920
4/1/2018
Client 2
Sample Site 1
B2
Bob Doe
Cindy Doe
1
100
5
630
4/1/2018
Client 3
Sample Site 2
B3
Jane Doe
Tim Doe
14
1000
82
3500
4/1/2018
Client 4
Sample Site 2
B3
Jane Doe
Tim Doe
0
20
1
300
4/2/2018
Client 1
Sample Site 1
B1
John Doe
Brandy Doe
0
400
15
950
4/2/2018
Client 2
Sample Site 1
B2
Bob Doe
Cindy Doe
1
120
2
620
4/2/2018
Client 3
Sample Site 2
B3
Jane Doe
Tim Doe
11
980
65
2800
4/2/2018
Client 4
Sample Site 2
B3
Jane Doe
Tim Doe
0
18
0
280
4/3/2018
Client 1
Sample Site 2
B3
John Doe
Brandy Doe
1
411
15
911
4/3/2018
Client 2
Sample Site 1
B2
Bob Doe
Cindy Doe
0
140
1
560
4/3/2018
Client 3
Sample Site 2
B3
Jane Doe
Tim Doe
14
1100
72
3800
4/3/2018
Client 4
Sample Site 2
B3
Jane Doe
Tim Doe
0
17
0
180
4/4/2018
Client 1
Sample Site 2
B3
John Doe
Brandy Doe
0
420
16
960
4/4/2018
Client 2
Sample Site 1
B2
Bob Doe
Cindy Doe
0
130
0
490
4/4/2018
Client 3
Sample Site 2
B3
Jane Doe
Tim Doe
10
900
45
1600
4/4/2018
Client 4
Sample Site 2
B3
Jane Doe
Tim Doe
1
10
0
90
4/5/2018
Client 1
Sample Site 2
B3
Jane Doe
Tim Doe
0
370
14
900
4/5/2018
Client 2
Sample Site 1
B2
Bob Doe
Cindy Doe
0
120
0
470
4/5/2018
Client 3
Sample Site 2
B3
Jane Doe
Tim Doe
9
800
32
1400
4/5/2018
Client 4
Sample Site 2
B3
Jane Doe
Tim Doe
0
5
0
30

<tbody>
</tbody>



If needed, I can provide the formula's I use to get all the data on the aggregate sheet. Ultimately with the aggregate sheet I create a dashboard (graphs, etc) and "pretty" it up for the management team. Again, what I am trying to figure out is a formula to change the data I am getting on the aggregate sheet when it is change on the settings page but not until it reaches the date set on the settings page and continues pulling that data until a new setting is set with a new date.
 
Upvote 0
Thanks, that's much clearer. :)

I would use a helper column in the Aggregate sheet. I have used column K and that column could be hidden once the formulas have been populated in it.

Assuming the sample data in 'Settings' is in A1:F7 (You will have to adjust the ranges in your actual sheet) then try each of these, copied down.

Excel Workbook
ABCDEFK
1DateClientSiteBuildingSenior ManagerManagerIndx
24/01/2018Client 1Sample Site 1B1John DoeBrandy Doe1
34/01/2018Client 2Sample Site 1B2Bob DoeCindy Doe2
44/01/2018Client 3Sample Site 2B3Jane DoeTim Doe3
54/01/2018Client 4Sample Site 2B3Jane DoeTim Doe4
64/02/2018Client 1Sample Site 1B1John DoeBrandy Doe1
74/02/2018Client 2Sample Site 1B2Bob DoeCindy Doe2
84/02/2018Client 3Sample Site 2B3Jane DoeTim Doe3
94/02/2018Client 4Sample Site 2B3Jane DoeTim Doe4
104/03/2018Client 1Sample Site 2B3John DoeBrandy Doe5
114/03/2018Client 2Sample Site 1B2Bob DoeCindy Doe2
124/03/2018Client 3Sample Site 2B3Jane DoeTim Doe3
134/03/2018Client 4Sample Site 2B3Jane DoeTim Doe4
144/04/2018Client 1Sample Site 2B3John DoeBrandy Doe5
154/04/2018Client 2Sample Site 1B2Bob DoeCindy Doe2
164/04/2018Client 3Sample Site 2B3Jane DoeTim Doe3
174/04/2018Client 4Sample Site 2B3Jane DoeTim Doe4
184/05/2018Client 1Sample Site 2B3Jane DoeTim Doe6
194/05/2018Client 2Sample Site 1B2Bob DoeCindy Doe2
204/05/2018Client 3Sample Site 2B3Jane DoeTim Doe3
214/05/2018Client 4Sample Site 2B3Jane DoeTim Doe4
Aggregate
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,287
Members
449,094
Latest member
GoToLeep

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