Hello All,
I am working with data that includes the following:
Situation A:
Name Gender SSN HH_ID HH_Relation
Susie F 1111
Mike M 2222 1111 Son
Situation B:
Name Gender SSN HH_ID HH_Relation
Susie F 3333 1111 Daughter
Mike M 2222 1111 Son
In Situation A, I am looking to update the Susie F row with HH_ID 1111 and HH_Relation with Self. Is there a way to record a macro that checks the HH_ID column and when it comes across a value, look for that value in the SSN column and, when finding it, update the HH_ID and HH_Relation with the values I need for that row?
In Situation B, I am looking to perform the same test but recognize that the 1111 value does not exist in the data and move on to the next HH_ID to check.
If a person is not with anyone else, the HH_ID column is null.
Any help is greatly appreciated. If I can provide additional information, please let me know.
Thank you for your help and time.
Sincerely,
Fred
I am working with data that includes the following:
Situation A:
Name Gender SSN HH_ID HH_Relation
Susie F 1111
Mike M 2222 1111 Son
Situation B:
Name Gender SSN HH_ID HH_Relation
Susie F 3333 1111 Daughter
Mike M 2222 1111 Son
In Situation A, I am looking to update the Susie F row with HH_ID 1111 and HH_Relation with Self. Is there a way to record a macro that checks the HH_ID column and when it comes across a value, look for that value in the SSN column and, when finding it, update the HH_ID and HH_Relation with the values I need for that row?
In Situation B, I am looking to perform the same test but recognize that the 1111 value does not exist in the data and move on to the next HH_ID to check.
If a person is not with anyone else, the HH_ID column is null.
Any help is greatly appreciated. If I can provide additional information, please let me know.
Thank you for your help and time.
Sincerely,
Fred