Adding numeric values derived from formulas

JBWalker

New Member
Joined
Feb 17, 2020
Messages
19
Office Version
  1. 2010
  2. 2007
I'm trying to add results that derive from a formula.

Example of what I'm trying to achieve.
Column A contains fruit and then column B:I contain individual formulas to calculate what fruit, for example;

=IF(A1="Apple","1","")
=IF(A1="Pear","1","")
=IF(A1="Orange","1","")
=IF(A1="Grape","1","")

So results would look like;

Apple 1 0 0 0
Pear 0 1 0 0
Orange 0 0 1 0
Apple 1 0 0 0
Grape 0 0 0 1

Now my problem is when i add =SUM(B1:B5) i get a result of 0 instead of 2.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You need to remove the quotes from the number, otherwise it's text
Excel Formula:
=IF(A1="Apple",1,"")
 
Upvote 0
Solution
If i may pose an additional question.

How would i apply the SUM equation to ignore #VALUE! error?

Reason being is that I'm attempting to build the whole spreadsheet for future use, but without knowing the fruit the =IF formula has nothing to read and therefore shows error.
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top