I have seen と used in the following manner.
公園に田中さんと行きました - I went to the park with Tanaka-san
And I have seen で used as follows.
公園に二人で行きました - I went to the part with 1 other person (2 people including me)
But now I have the following sentence.
家族で旅行に行ってきました - I went traveling with my family
Would it have been appropriate to use either と or で in this situation? Or is there a reason で was used?
I am thinking maybe the use of で indicates you are in the group you're going with and と indicates you are not a part of the group. Is that what's going on?