SUMPRODUCT Blank Cells with LEFT & RIGHT

Unlucky-Phase

New Member
Joined
Sep 23, 2019
Messages
14
Hello,


I'm looking to use this formula =SUMPRODUCT(LEFT(G3:G100,2)+(RIGHT(G3:G100,8))) with cells that have numbers in but some in the middle are blank. If I try and return it at the moment, I get a value error due to blank cells. How do I get it to skip blanks?


I don't want to shorten the column as I want to be able to insert new information everyday and the cell range to be long enough to always add up the numbers without adjusting the range.

To give you an idea, these are the type of numbers I'm using in the cells:
00:00:05:11
00:00:01:41
00:00:13:43
00:01:13:32

I'm currently unable to upload a worksheet.



Thanks,
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the forum!

Try this array formula:

{=SUMPRODUCT(LEFT(IF(G3:G100<>"",G3:G100,0),2)+(RIGHT(IF(G3:G100<>"",G3:G100,0),8)))}

Or this shorter array formula

{=SUM(IF(G3:G100<>"",LEFT(G3:G100,2)+(RIGHT(G3:G100,8))))}

Array formulas
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
 
Last edited:
Upvote 0
Here is another formula (normally entered) that you can consider...

=SUMPRODUCT(LEFT(G3:G100&"00",2)+RIGHT("00:00:00"&G3:G100,8))
 
Upvote 0
Thank you both very much! All worked perfectly!
Have been trying to figure this out and just couldn’t get my head around it! Thanks again!
 
Upvote 0
@mollypj
For future reference, whilst we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

https://www.excelforum.com/excel-ge...nk-cells-with-left-and-right.html#post5197020
 
Upvote 0
Hi Fluff,

No worries - sorry didn't realise and I hadn't had a correct answer hence why I was looking elsewhere for help. I'll make sure to reference these answers in the other thread.

Thanks
 
Upvote 0
Thank you both very much! All worked perfectly!
Have been trying to figure this out and just couldn’t get my head around it! Thanks again!

I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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