|  

» Ignoring Blank Cells when Performing Calculations

Problem:

Columns A & B contain numbers as well as empty cells.
We want to be able to multiply each number in column A with the matching number in Column B without getting false results or errors.

Solution:

Use IF, AND and ISNUMBER functions in the following formula:
=IF(AND(ISNUMBER(A2), ISNUMBER(B2)),A2*B2," ")



Example:


List1___List2___Result
2_______3_______6
5
8
11______4_______44


Screenshot // Ignoring Blank Cells when Performing Calculations
Ignoring Blank Cells when Performing Calculations


Rate This Tip
12 34 5
Rating: 3.15     Views: 29665
Ignoring Blank Cells when Performing Calculations
gms_nm
This formula is more useful when the cell has a non numeric entry, say a text entry. In which case but for this formula it would have given a result "#VALUE!"
Which would have meant one could not sum the value up.

If the cell is blank, without the formula it would give a result "0", with the formula it returns with a blank text entry.

This forumla is more appropriate termed as "ignoring text cells when performing calculations"
Formula-error
Harager
I found out that in above written formula there was made a mistake, it should be :

IF(AND(ISNUMBER(A2);ISNUMBER(B2)); A2*B2; " ")

where between ISNUMBER(A2) and ISNUMBER(B2) there should be ';' and not ','

With friendly greetings,

Harager
No replace for #Value?
Moshe
Is there no way to request #Value to be replaced with an empty string?
Click here to post comment
For Registered Users
Name
Comment Title
Comments