Is this 5e? It should work in the damage section, though you don't necessarily need the [[ ]] brackets around it. It won't hurt, but it'll mean you won't get the tooltip info on mouseover since the whole damage field is wrapped in brackets by the sheet. The attack section is harder - I'm also confused about what you're trying to do. You're not using the spellcasting modifier for spell attack rolls? Or this is a bonus which only applies to cantrips? Either way, you can't stuff math into those tiny + 0 bonus fields for attack and damage, they only take flat numbers. Given the extremely small number of cantrips with an attack roll that a player is likely to use, you're probably best off just making custom macros for each one. Copy the one straight from the sheet, edit the attack rolls, then make it/them a macro bar button for that player. The alternative would be to just put the flat number in that +0 section and remember to update it at 5, 11 and 17.