Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SUMIF not strikethrough

Is is possible with Google Sheets to calculate the fields (currency) and ignore all fields that have had a strikethrough applied?

like image 670
Cybercampbell Avatar asked Sep 11 '12 09:09

Cybercampbell


2 Answers

Cell formatting can not be used as a criteria on spreadsheet formulas as there's no formulas (AFAIK) that can grab a cell formatting.

It would be much easier if you'd have another column where you marked your values with a cell value change, like 'yes/no' or an 'x'.

You can do it in Apps Script. But relying in formatting to make calculations in Apps Script is tricky. I recommend have a menu triggered function that grabs the "strikethrough" format and generate a 'yes/no' column so you can use in regular formulas like SumIf.

like image 151
Henrique G. Abreu Avatar answered Mar 04 '23 17:03

Henrique G. Abreu


Answer is here: http://igoogledrive.blogspot.ca/2012/09/user-defined-function-to-sum-all.html

like image 24
Cybercampbell Avatar answered Mar 04 '23 19:03

Cybercampbell