# Excel Formula Write Cell error

Hi,

I am trying to write a formula within the Excel application scope but got an error “The range does not exist.”
I don’t have ; in the formula:

“=PROPER(MID(i2,1,FIND(”""","""",i2,1)-1)) & “”"", “”""&UPPER(RIGHT(i2,2))"

I tried to cut it down and use only:
“=PROPER(MID(i2,1,FIND(”""","""",i2,1)-1))"

Still wouldn’t work…
With all these “”""" because it otherwise gave me another error.

Can you please advise how to fix this? Thanks!

I would output your formula as you have it in the Write Cell to like a Message Box or Write Line, in order to verify that the formula is correct. Also, I’m not sure but you might need capital ‘I’ instead of ‘i’ when referencing ‘I2’ in your formula.

Hi @ClaytonM,

Thanks for your response!
Capital I doesn’t work

My write cell input looks like this:
“=PROPER(MID(I2,1,FIND("""","""",I2,1)-1)) & “”"", “”""&UPPER(RIGHT(I2,2))"

Message box:

There are extra “” around the ,
So I tried to put only 3 "s around the , instead of 4 → error: end of expression expected.

Any idea? Thanks

Edit:

Also, the color of the formula is not in the standard string dark brick-red color…
“=PROPER( ->Black
MID → Blue
(I2,1,FIND( ->Black
“”"","""" → Red, Black, Red

,I2,1)-1)) & “” → Black
“, “”"&UPPER(RIGHT(I2,2))" ->Red

I tried to use Type Into but it wouldn’t let me press Enter

(still: extra " around ,)
All I could do is to press ESC…and clear out the formula…

Change the formula to
“=proper(left(I2, len(I2)-2)) & upper(right(I2, 2))”

and works. still want to know how to make the following works though if someone has insights.
“=PROPER(MID(I2,1,FIND("""","""",I2,1)-1)) & “”"", “”""&UPPER(RIGHT(I2,2))"

and the type into formula issue if anyone comes across and have a solution.

Thanks

Maybe it’s just me, but when I typed in your formula in Excel it tells me there are too many arguments. So check that you have the functions in there correct.

It’s because of the extra “”"""" that I put in it to “work” in Uipath.

The original excel formula is this:

=PROPER(MID(i2,1,FIND(",",i2,1)-1))&", "&UPPER(RIGHT(i2,2))

Thanks though

Gotcha.

I found this as an alternative. You can use vb to convert your string.

``````StrConv("abc",vbProperCase)
``````

So you can do a split by comma:

``````StrConv(text.Split(","c)(0),vbProperCase)+", "+text.Split(","c)(1)
``````

@ClaytonM Got it! Thanks