Blind_Man_Dan
New Member
- Joined
- Sep 3, 2020
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hi Folks
I have a list of people from the Electoral Roll, and they're sorted into their addresses. I now need to compare the people in each address to see if their surnames are all the same so I can determine what to have as the addressee on an envelope, eg if all people have the same surname, I'm going to address the envelope as "The Smith Family". With households ranging from 1 to maybe 10 people, I'm struggling to work out the best way to establish this. Obviously if there's only 1 or two people in the household, it's fairly straight forward, however if there's more, I'm getting lost with how to achieve this. I've thought about defining the range of the surnames, then using a for each cell in range, but I'm struggling to work out how that will give me the result I need, which is to know if all the surnames are the same.
StrComp would be useful if I could compare more than 2, and I thought about an IF,Then, type thing, but as the number of things I need to compare are variable, I just can't work it out!
Any suggestions gladly appreciated, otherwise I've got about 3000 addresses to go through and do it manually!
Cheers
Dan
I have a list of people from the Electoral Roll, and they're sorted into their addresses. I now need to compare the people in each address to see if their surnames are all the same so I can determine what to have as the addressee on an envelope, eg if all people have the same surname, I'm going to address the envelope as "The Smith Family". With households ranging from 1 to maybe 10 people, I'm struggling to work out the best way to establish this. Obviously if there's only 1 or two people in the household, it's fairly straight forward, however if there's more, I'm getting lost with how to achieve this. I've thought about defining the range of the surnames, then using a for each cell in range, but I'm struggling to work out how that will give me the result I need, which is to know if all the surnames are the same.
StrComp would be useful if I could compare more than 2, and I thought about an IF,Then, type thing, but as the number of things I need to compare are variable, I just can't work it out!
Any suggestions gladly appreciated, otherwise I've got about 3000 addresses to go through and do it manually!
Cheers
Dan