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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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