How to sum of lookup figure???

How to sum of lookup figure???

Hello, I hope anyone can help me.
I'm almost giving up on this issue.

I build a mainframe that enables me to choose each of the detailed forms.

[Mainframe]
Material cost[lookup]+ Process cost[lookup]+Quality cost[lookup]=SubTotalDirectCost

I used "function" to SubTotalDirectCost
and then, the formula is Materialcost+Processcost+Qualitycost

but that result was beyond my imagine

it was like that
1+2+3+4=337341000002444075.81

I guess that the summation calculates all of the data which I have chosen through the "lookup" field.

Can anyone solve this issue?