You can use the search language to update the user provided value before searching. One way to do that would be to use the eval's match command to replace spaces with colons at the beginning of the search:
sourcetype=logs_with_MACs [ | stats count | eval dest_mac=replace(dest_mac,"\s",":") | return dest_mac] | stats count by dest_mac
revision based on additional information:
sourcetype=logs_with_MACs [ | stats count | eval dest_mac=replace(dest_mac,"\s|,|-|_|\.",":") | return dest_mac] | stats count by dest_mac
applying to your search...
index="dhcp" sourcetype="DhcpLog" [ | stats count | eval MAC=replace("$MAC$","\s|,|-|_|\.",":") | return MAC]
| stats first(_time) as first, last(_time) as last range(_time) as range values(DevName) as Device by IPls
| convert ctime(first) AS Last_Time ctime(last) AS First_Time
| eval Duration=floor(range/3600).":".floor((range%3600)/60).":".((range%3600)%60)
| fields - first, last, range
... View more