Problem when adding a new column and writing a formula


#1

Hi,

I have a problem when inserting a new column to my excel spreadsheet and thereafter writing a formula in the newly added column. The formula is inserted as text and not the value (as you see in the attached file). Furthermore, the formula will not change as if you drag the first cell manually in excel. The code worked when I did not insert a new column.
Do you have any good solutions to this problem?

Thanks


#2

Make sure the range should be correct and the formula should be in double quotes and if you can share the code and excel i can try helping you more in this.

Thanks


#3

I cannot upload any file because I am a new user and unfortunately I cannot share the excel file because it contains confidential information. Can you please explain the double quotes? Thanks!


#4

You can have this code as reference for adding the formula into your excel sheetSum C.xaml (7.3 KB)
Sums.xlsx (8.2 KB)


#5

I will have a look at it. Thank you so much for your help!


#6

The “Sum” code did not work but I managed to upload my code.

Ensured prøve.xaml (9.5 KB)