Since you have 1 search term for 2 fields, this is tricky. I would consider splitting it into 2 search fields. However, barring that I would just go with:
$postcodesearch = substr($search,0,4);
$query =
"SELECT * FROM $usertable WHERE
($postcodelist LIKE '%$postcodesearch%'
OR $city LIKE '%$search%')
AND $office <> ''
GROUP BY $office";