VLOOKUP for a date within a referenced row of matching username

Hi,

I am building a sheet that references a larger sheet of user activity. There are two sheets are play. Sheet A is the main database and Sheet B is a culmination of data, soon to shoot off into reports of its own.

Sheet A has two columns which include parent and child rows.

Sheet A Column 1 is named originalUsernames. It contains usernames manually inserted. Each unique username is a parent row. The child rows repeat the username featured in the parent rows' originalUsernames column.

Sheet A Column 2 is called "Job End Date" and contains dates. The child rows within this column contain different dates to represent different "Job End Dates" for the same user presented in the child rows.

This is where it gets tricky.

In Sheet B Column 1, I am pushing data from an alternate source via API with usernames that match the originalUsernames found in Sheet A Column 1.

Sheet B Column 1 is called userName

To match up my originalUsernames from Sheet A Column 1 with Sheet B Column 1, I use the column formula in Sheet B Column 2 below:

=IFERROR(VLOOKUP(userName@row, {originaluserName}, 1, false), "No username")

This part works great, and usernames from each sheet line up on their respective rows, showcasing the error "No username" as intended if no username is present in Sheet A Column 1.

Now, in Sheet B Column 3 I need to pull in the Job End Date the most in the future from Sheet A Column 2, all while matching up with the appropriate rows present.

I tried referencing the Job End Date column in Sheet A Column 2, and building a similar VLOOKUP, but it is just giving me the error of "No dates", but there are dates present, and many.

=IFERROR(VLOOKUP(userName@row, {JobEndDate}, 1, false), "No dates")

I am also missing the part for searching for the most future date within the child rows of each username.

Thank you for your insight on next steps.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!