Jakub P
Jakub P

Reputation: 21

VBA Search Two Ranges and Execute action

I tried searching for some potential answers to this question but I suppose my issue is too specific and I can't apply solutions I found.

Source Example

With above source I need to scan Column A and identify all John Doe's and afterwards for all John Doe I need to scan corresponding cells in Column B and if there is Date in any of them take the newest date and paste it into all corresponding cells.

So expected result would be:

Expected Result

Any hints on how to achieve this? I'm afraid my VBA skills are too weak.

Upvotes: 1

Views: 57

Answers (2)

u17
u17

Reputation: 2824

In Excel 2013 and prior versions, this can be achieved without macros with an array formula. To use an array formula, type the formula in a cell (without { and }), then press Ctrl+Shift+Enter.

enter image description here

Upvotes: 1

Kresimir L.
Kresimir L.

Reputation: 2441

May I propose simple formula solution to your problem? if you have your email name in column A , and Dates in column B, enter this formula =MAXIFS($B$2:$B$100,$A$2:$A$100,A2) in cell B2 and drag it to the bottom. You should get this result. Adjust range inside formula to your needs.

enter image description here

Upvotes: 1

Related Questions