Sumproduct Left function ignore blank cells

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,368
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
How do I ignore the blank cells in this small range of five cells? I'm trying to sum the first three numbers in each cell.

=SUMPRODUCT(--(A2:A6<>""),LEFT(A2:A6,3))

Excel 2016 (Windows) 64 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]
128/76​
[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]
[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]
118/76​
[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]
[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]
130/83​
[/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: BP[/td][/tr][/table]
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Maybe

=SUMPRODUCT(--(A2:A6<>""),--LEFT(0&A2:A6,4))
You do not need to test whether the cell is blank or not... you took care of that by concatenating a 0 onto the front of the cell values. Yoiur formula works fine when written like this...

=SUMPRODUCT(--LEFT(0&A2:A6,4))
 
Upvote 0
Thanks Rick for the additional info. Works great.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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