Can we export from membership search and include fields for groups?
I've run into an almost identical problem, which I solved with a custom extension.  I've hardcoded which groups correspond to chapters, and whenever someone is added to a group, I check if it's a "chapter" group.  If so, I update a custom field with their chapter name, so I can export it.
I could upload the entire extension to Github if you like, but the relevant code is here.


function membershipcards_civicrm_post($op, $objectName, $objectId, &amp;$objectRef) {
  //set the chapter name for membership cards
  if(($op == 'create' || $op == 'edit') &amp;&amp; $objectName == 'GroupContact'){
    $params = array(
      'version' =&gt; 3,
      'sequential' =&gt; 1,
      'contact_id' =&gt; $objectRef[0],
    );
    $result = civicrm_api('GroupContact', 'get', $params);
    //cycle through the groups.  If you find one that's a chapter
    //(currently hardcoded as gid &lt;= 83), return its title.
    foreach($result['values'] as $key =&gt; $value){
      if($value['group_id'] &lt;= 83) {
        $chapter = $value['title'];
        break;
      }
    }
    $params = array(
      'version' =&gt; 3,
      'sequential' =&gt; 1,
      'custom_98' =&gt; $chapter,
      'id' =&gt; $objectRef[0],
    );
    $result = civicrm_api('Contact', 'create', $params);
  }
}