Need to ignore blank cells

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi

I have the following formula, but if i get a blank in the range it falls over.

How can I ignore blank rows?

=SUMPRODUCT(--(1/COUNTIF(SINGLE!B13:B48,SINGLE!B13:B48)<1),--(1/COUNTIF(SINGLE!B13:B48,SINGLE!B13:B48)))
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Sample :

1
2
3
4
4
4
5
6
7

Desired result = 1 (counted the duplicate item)


1
2
2
3
4
4
4

Desired result = 2 (counted 2 duplicate items)


1

2
4
4

Desired result = 1 (ignored blank and counted duplicate item)
Try this...

=SUMPRODUCT(--(FREQUENCY(A2:A10,A2:A10)>1))
 
Upvote 0
Wow...can you explain that in a bit more detail please Al,

Match ~ ?

Thanks!

~ deactivates the special meaning of some chars like < and *. Functions like CountIf or Match are sensitive to their presence. If you think you'll never items surrounded with special meaning chars, you can omit the "~"& and &"" bits from the formula.
 
Upvote 0
Any way of doing it through SUMPRODUCT, or a conversion of this into sumproduct?

Why? Formulas with control+shift=enter are essential tools in Excel. Note that the formula
does not count empty cells or formula blanks. Moreover, it works also with non-numeric data.
 
Upvote 0
Wow thanks guys...learning alot on this thread!

Ah yes you are correct, I may have alpha-numeric references!

One final request

If I wanted to find the nth largest value of column C, based on the above formulas

e.g.

1...5
2...7
3...9
4...11
4...5
4...1
5...7
5...7
5...4
6...1
6...3
7...20

So, if I wanted to find the 1st largest group it would be 5, as the sum of column C is 18

Wanted to find the 1st largest single it would be 7, as its value is 20

Wanted to find the 3rd largest overall, it would be 4 as its value is 17

I am happy with 3 different formula (one for group, one for single, one for overall) but not sure the best way to implement MAX, MIN, LARGE, SMALL with this methods above?

Any help would be great as I can then complete my project tonight!
 
Upvote 0
I may have alpha-numeric references!



e.g.

1...5
2...7
3...9
4...11
4...5
4...1
5...7
5...7
5...4
6...1
6...3
7...20
Then why are you posting sample data that is all numeric?

I answer the question as it's written/demonstrated/described. If you post all numeric sample data then I make my suggestion based on the sample data being all numeric. ;)

So, if:

I may have alpha-numeric references!
Then disregard my suggestion.
 
Upvote 0
Very true, apologies

Now for the sumproduct (that will sum numerics in column C based on column B grouping)

Would I wrap Aladin formula as the array element to select valid rows, then sum the corresponding column C, then wrap it all within a LARGE and then wrap the whole thing in a SUMPRODUCT?
 
Upvote 0
Nearly there I think

{=LARGE(SUM(Formula to select valid rows where FREQUENCY>1, Column C1:C48)),1)}

Just need some help with incorporating Aladin logic into the base of the formula

If this is the correct method?
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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