I'm quite new at this, so bear with my ignorance...

I have this situation

A B C D
1 2 5 6
2 3 6 7
3 4 8
4 5 7
5 6 8 9
6 7 9 10

I want to create a formula that does this
=(A1*5)+(B1*10)+(C1*10)+(D1*20) (just an example)
But when I use Autofill it says value error with C3 and D4 because it is blank... I want to make the formula count the blank as zero making the last part in the add zero but still adding the rest up. I tried with the IFBLANK but I couldn't succeed

Please help, and sorry if this is very low tech