PDA

View Full Version : Comparing Data Across Sheets, with Multiple Variables



Rodger
12-30-2017, 05:21 PM
I have two issues that are very similar, so I'm combining them into a single post.

Issue 1 - I have two sheets that I'm working with. One sheet is entitled "Bios", and the other is entitled "Stats". Both sheets have "Client ID" and "Weight" columns. What I'd like to do is, update the "Weight" column on the "Bios" sheet to the difference of the the "Weight" values on the "Stats" sheet. The "Stats" sheet has an "Updated" column, which I need to leverage. So I want the "Height" value from the MAX "Updated" date to be subtracted from the MIN "Updated" date on the "Stats" sheet.

I've included mock tables of both sheets below. Based on the 2nd table, the expected result in the 1st table would be "21.40". I'm thinking a formula would have some nesting, including a VLOOKUP; but I'm not sure how to account for the identification and comparison of the dates. If VBA is required, I'm fine with that (probably prefer it since I'm trying to learn it).



Client ID
Weight


RB1






Updated
Client ID
Weight


12/30/17
RB1
271.20


01/10/18
RB1
265.80


01/25/18
RB1
252.40


01/31/18
RB1
249.80



Issue 2 - Very much the same as the first issue, but I need to compare against multiple sheets, that may not be created yet. Every time a new Client is added, they get their own sheet, named the same as the "Client ID". What I'd be looking to do is, pull a specific value from whatever sheet where the sheet name equals the "Client ID". In this case, I'd be looking for the "Pymt Status" in the last row, on the sheet named "RB1". I can code for the last row part, but the rest, I'm at a loss.



Client ID
Pymt Status


RB1



JB2




Long post, and hopefully I was descriptive enough. Any and all constructive feedback is appreciated!

Dave
01-01-2018, 07:56 AM
FYI https://www.mrexcel.com/forum/excel-questions/1037005-comparing-data-across-sheets-multiple-variables.html Dave

Paul_Hossler
01-01-2018, 09:08 AM
@Rodger --

1. Please read the FAQ about multi-posting in my sig - no one minds if you post on other BBS, we just like to know

2. I see that you've corrected / clarified / expanded on MrExcel -- without knowing that you'd also posted there, we wouldn't have that information

3. It's usually better to attach a workbook with the 'before' and the 'after' instead of screen shots, text, etc. - potential responders are more likely to offer suggestions if they don't have to re-create a workbook, and there's a better chance of not making a mistake or misunderstanding -- see my sig for instructions about attaching

Rodger
01-01-2018, 09:16 AM
Paul - Thank you VERY much for the clarification. Admittedly, I was confused as to why the cross post appeared to be an issue, but now I completely understand and apologize for any confusion and/or wasted time. I am very appreciative of the information that I've received from everyone in the forums that I utilize. Going forward, I'll do a better job of managing my posts.

Again, thank you!