Application.Convertformula causes Run.time error '13'

dodolabs

New Member
Joined
Mar 8, 2019
Messages
2
Hello guys!

I would like to insert a formula to a cell with a macro, but it doesn't work.

Here is the macro:
Code:
Sub Macro1()

Dim oszlop As String
Dim fuggveny As String
Dim fuggveny2 As String

oszlop = "D"

fuggveny = "=IF(ISNA(VLOOKUP(Work!" & oszlop & "2;Work!" & oszlop & ":" & oszlop & ";1;0));" & Chr(34) & Chrw(10004) & Chr(34) & ";" & Chr(34) & "Open" & Chr(34) & ")"
fuggveny2 = Application.ConvertFormula(fuggveny, xlA1, xlR1C1)

End Sub
Could you help me?

Thanks!
 
Last edited by a moderator:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try replacing the semicolons with commas.
 
Upvote 0

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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