MID formula from VBA

jojobote

New Member
Joined
Apr 3, 2017
Messages
2
Hi there,
I've pretty much usd all the words combination I could on Google and didn't find anything :'(...
I'm trying to put excel formulas in dedicated cells, from my vba script.
I've managed to do that using different ways, last one being :

Code:
ThisWorkbook.Sheets(3).Activate
    ThisWorkbook.Sheets(3).Cells(2, 2).Select
    ActiveCell.Formula = "=MID(A2;1;3)"

It returns the 1004 error.
Interesting thing is that, no matter what formula I put instead of "MID", it works flawlessly. Be it number related (sum), or string related (lower..).
ONLY THE MID FORMULA doesn't work.

I'm getting desperate here please help !
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Perhaps it is the semi colon ; instead of comma , in the MID formula???

You have a mixture of commas and semi colons.

Howard
 
Upvote 0
THAT WAS IT THANKS !
I have a french excel, the formula looks like "STXT(A2;1;3)", I changed "stxt" to "mid" but didn't think the ponctuation would actually change as well.
Thanks for the quick response.
 
Upvote 0

Forum statistics

Threads
1,215,695
Messages
6,126,263
Members
449,307
Latest member
Andile

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top