0

As the title says: I'm trying to set the Index function to a cell, using VBA. For some reason it does not work. I don't see why, since the formula works when I write it to the cell manually ("word1" will appear in cell A1).

Here is my approach (not working):

Cells(1, 1).Formula = "=INDEX(B5:B8;E1;1)"

The rest of my code doesn't matter since applying other formulas work. Working example:

Cells(1, 1).Formula = "=SUM(E1:H1)"

My excel sheet looks like this:

    A     B     C     D     E     F     G     H     I
1                           1     2     3     4  
2
3
4
5   1   word1
6   2   word2
7   3   word3
8   4   word4

Thanks for helping me here!

braX
  • 11,506
  • 5
  • 20
  • 33
maxischl
  • 579
  • 1
  • 11
  • 29

0 Answers0