Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How to sum 2 cells in a straight table

Hello,

I'm trying to sum 2 cells in a straight table and place the value in VAR_SUM variable.

The following macro gives me the error Type mismatch on line st3 = st1 + st2:

Set st = ActiveDocument.GetSheetObject("CH15")

st1 = st.GetCell(1, 4)

st2 = st.GetCell(4, 4)

st3 = st1 + st2

ActiveDocument.Variables("VAR_SUM").SetContent st3.Number, true

How do I do this?

Many thanks!



2 Replies
Highlighted

How to sum 2 cells in a straight table

Hello,

It should be as simple as

st3 = st1.Text + st2.Text


Hope that helps.

Highlighted
Not applicable

How to sum 2 cells in a straight table

Thanks a lot Miguel!