Hello. I'm new to advanced excel commands and stuff. The most advanced things I have done so far is simple formulas like =SUM(A1:B5) etc.

Anyway, my problem is that I need an easy way to exclude values from a long row of them. I got a row of 17 different values (calculated from other cells) and I would like to have those in a checklist kind of list, where all the values got summarized except for those with checked checkboxes.

Like this, for example:

50 [X]
40 [ ]
30 [ ]
20 [X]
10 [ ]
Total: 80 (40+30+10)

I know what this would probably look like as far as code goes, but I don't know how to write it in Visual Basic. As far as I know, something like this would work:

If [checkbox is checked]
then [assigned cells value will be ignored]
else [assigned cells value will not be ignored]

Thanks,
~Robin