Problem Adding formulas in different cells with VBA

Espino2606

New Member
Joined
May 30, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hey! I want to add formulas to various cells in excel with VBA , the first two work really well , but in the third (bicipital) I always get a error saying that there is an error with the formula
I have tried copying and pasting the first line that works and changing the name , still doesn't wort

VBA Code:
Sub AntroHCcom()
Sheets("Deportes en Especifico").Select
Range("O61").FormulaArray = "=IFERROR(INDEX(Historial[[Tricipital ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O62").FormulaArray = "=IFERROR(INDEX(Historial[[Subescapular ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O63").FormulaArray = "=IFERROR(INDEX(Historial[[Bicipital ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O64").FormulaArray = "=IFERROR(INDEX(Historial[[Supracrestal ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O65").FormulaArray = "=IFERROR(INDEX(Historial[[Supraespinal ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O66").FormulaArray = "=IFERROR(INDEX(Historial[[Abdominal ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O67").FormulaArray = "=IFERROR(INDEX(Historial[[Muslo anterior ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"
Range("O68").FormulaArray = "=IFERROR(INDEX(Historial[[Pantorilla ]],MATCH(R56,Historial[Suma Nom y Med],0)),"""")"

End Sub
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If the first two lines are working, this suggest the problem is with the table column name "Bicipital ".

Are you sure the Historial table has a column called "Bicipital "? This need to be an exact match, including the single trailing space character.
 
Upvote 0
AND
Have you tried commenting out the "Bicipital " line in the code and see if the code continues ??
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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