Forum Discussion

Rolf_08's avatar
Rolf_08
Copper Contributor
Mar 29, 2023

Problem pasting with "-"

Hi all,

 

when pasting the following in Excel I get the #NAME error because Excel makes it into a formula by adding "=" in front. 

 

"- protein chocolate" becomes "=- protein chocolate" which gives ofcourse the error #NAME since it's not a correct formula.

 

I need it to be just "protein chocolate" in the end, without the "-".

 

How can I solve this?

  • Rolf_08 

    To keep the hyphen/minus prefix the formula with a single quote / apostrophe.  

    Otherwise pre-format the cell as 'text' using number formatting.  SUBSTITUTE or Text to Columns would then remove the hyphen.

    • Rolf_08's avatar
      Rolf_08
      Copper Contributor

      Thanks PeterBartholomew1 

       

      I now pre-format the cell with the number formatting and substitute to remove the hyphen.

       

      Thanks again.

Resources