# how to make a formulas to automatic count Profit

#### Oscarr

##### Member
Hi All

how to make a formulas to automatic count total deduct Cost = Profit

Thanks

#### Attachments

• 10.5 KB Views: 3

#### bosco_yip

##### Excel Ninja
Calculation of total Profit

In H5, formula copied down :

=(F5-VLOOKUP(D5,Cost!\$B\$4:\$C\$6,2,0))*E5

Regards

#### herofox

##### Active Member
you can to use this
Code:
``=IFERROR(G5-(\$E5*VLOOKUP(\$D5,Cost!\$B\$4:\$C\$190,2,0)),"")``

#### Attachments

• 13.1 KB Views: 1
Last edited:

#### Oscarr

##### Member
Calculation of total Profit

In H5, formula copied down :

=(F5-VLOOKUP(D5,Cost!\$B\$4:\$C\$6,2,0))*E5

Regards
hi @bosco_yip

thanks for help, your formulas is work

#### Oscarr

##### Member
you can to use this
Code:
``=G5-(\$E5*VLOOKUP(\$D5,Cost!\$B\$4:\$C\$190,2,0))``
hi @herofox

thanks for help, your formulas is work

#### Oscarr

##### Member
Calculation of total Profit

In H5, formula copied down :

=(F5-VLOOKUP(D5,Cost!\$B\$4:\$C\$6,2,0))*E5

Regards
hi @bosco_yip

can make away the error when there is blank?

thanks

#### Oscarr

##### Member
you can to use this
Code:
``=IFERROR(G5-(\$E5*VLOOKUP(\$D5,Cost!\$B\$4:\$C\$190,2,0)),"")``
Hi @herofox

can make away the error when there is blank?

thanks

#### herofox

##### Active Member
ok no problem ,pls check my last post (Post NO. 3) ,you will found what you want
and why to write alot of Post to Replay as fedback ?!!!!
it's one Post enough to Replay .

#### Attachments

• 16 KB Views: 3