title: VBA and concatenate function
body: <p>I'm actually looking to optimize my existing concatenate formula that I use to configure a bunch of controller (networking) </p>
  
  <p>I have Sheet1 where I enter all the details requiered from A2 to E2
  I have Sheet2 where that produce the overall concatenate, that include the valude from Sheet1.A2 and include some command, here is the concatenate formula:</p>
  
  <p>=CONCATENATE("ap ",Imported_Data!B2,CHAR(10)," ip enable ",CHAR(10)," ip mode static ",CHAR(10)," ip addr ",Imported_Data!A2," ",Imported_Data!L$2," gateway ",Imported_Data!L$3,CHAR(10)," ip name-server ",Imported_Data!L$4," ",Imported_Data!L$5,CHAR(10)," devname ",Imported_Data!C2,CHAR(10)," description ",CHAR(147),Imported_Data!D2,CHAR(147),CHAR(10)," location ",CHAR(147),Imported_Data!E2,CHAR(147),CHAR(10)," end") </p>
  
  <p>and the result below:</p>
  
  <pre><code>"ap 00:00:00:00:00:00
   ip enable 
   ip mode static 
   ip addr 1.1.1.1 255.255.0.0 gateway 172.27.1.1
   ip name-server 4.2.2.1 4.2.2.2
   devname name
   description “Description“
   location “location“
   end"
  </code></pre>
  
  <p>in order to have it accepted on the controller is to manipulate the result, copy the concatenate result into notepad++, remove the "" that added from the concatenate formula, and replace the CHAR(147) by "" ( that the only way I've found to have it working) </p>
  
  <p>what I would like to have in VBA is a filter that will: </p>
  
  <p>1) remove the "" at the begining and end of the block of concatenate
  2) replace the `` with "" at the description and location</p>
  
  <p>end result should be: </p>
  
  <pre><code>ap 00:00:00:00:00:00
   ip enable 
   ip mode static 
   ip addr 1.1.1.1 255.255.0.0 gateway 172.27.1.1
   ip name-server 4.2.2.1 4.2.2.2
   devname name
   description "Description"
   location "location"
   end
  </code></pre>
  
  <p>any suggestion/advise? </p>