stone@cunixb.cc.columbia.edu (Glenn Stone) (05/22/91)
A question for a 123 or Quattro wizard. I have a set of Nigerian household censuses in a spreadsheet that is structured, in part, like this: HHnumber Relation Name Father's Name --------------------------------------------------- 244 Head John Adam 244 Wife Ann Bill 244 Son Charles 244 Daughter Betty 244 Wife Diane David 244 Son George 244 Son Harry 245 Head Carl Frank 245 Wife Pam Peter 245 Wife Paula Larry 245 Daughter Susan 245 Son Sam 245 Brother Thomas Frank etc. Sons and daughters have nothing in the FATHER'S NAME field, and what I want to do is fill in these cells. Is there a formula that will check for Sons/Daughters and then retrieve the first Head's name in the column above? If not, any suggestions on how to start writing a macro for the task? If it's too woolly I can always dump the data into a file and write my own program to assign the fathers' names, but I'd like to do it in the spreadsheet. Thanks in advance for any suggestions. ------------------------------------------------------------------------- Glenn Stone BITNET: stone@cunixc Columbia University INTERNET: stone@cunixb.cc.columbia.edu -------------------------------------------------------------------------