Macro for Completing a Null Data Field

pawville

New Member
Joined
Apr 5, 2006
Messages
18
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
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top