# Excel formula in python code

**URL:** <https://discuss.python.org/t/excel-formula-in-python-code/16039>\
**Category:** Python Help\
**Created:** [May 27, 2022, 8:42pm UTC](https://discuss.python.org/t/excel-formula-in-python-code/16039 "2022-05-27T20:42:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mlgtechuser](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mlgtechuser/32/7310_2.png) [@mlgtechuser](https://discuss.python.org/u/mlgtechuser)\
**Post date:** [May 29, 2022, 12:11pm UTC](https://discuss.python.org/t/excel-formula-in-python-code/16039/7 "2022-05-29T12:11:18Z")

</div>

> [@rob42](#):
>
> I can see that your `SUBSTITUTE` is removing any spaces

Ah. On DiscourseMobile, the line wrapped right at the first pair of quotes in SUBSTITUTE ( ), so I couldn’t see the space. @adisc, if you use the code formatting controls shown [HERE](https://discuss.python.org/t/about-the-users-category/42) and [HERE](https://discuss.python.org/t/python-discourse-quick-start/116), that will help other people read your code.

```python
=CONCAT(MID(SUBSTITUTE(A2;" “;”");{15\16\13\14\11\12\9\10\19\20\17\18};1))

```

I will try your Excel formula in Excel.

---

_[View the full topic](https://discuss.python.org/t/excel-formula-in-python-code/16039)._
