The 3rd Conditional
Let's say before I came back home from work my wife had already gone for shopping. I wanted to go with her but she was already there. So when she came back I should have said:
If you had waited for me (untill I came back home), I would have gone for shopping with you.
Does this make any sense (from grammatical poin of view)?