Sum a row where cells contain text and numbers

dbarnes

New Member
Joined
Oct 19, 2006
Messages
13
I am trying to "sum" a row with the following data


A1 has 20gb
B1 has 23gb
C1 is blank
D1 is blank
E1 is the sum of the entire row

in the "E1" Cell I have the following formula to calculate /w text the sum for the row
=SUM(VALUE(LEFT(C4:M4,LEN(C4:M4)-2)))

This works fine if I do not have any blank cells in my row; however, if there are blank cells, I get a "#VALUE!" in cell E1.

How can I calculate a row where the cells contain a mix of numbers and text as well as some cells being blank?

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Is your text always "gb"?

If so perhaps you can just format the cells as

0"gb" and then put 20 in A1, 23 in B1 and just use

=SUM(A1:D1)
 

Forum statistics

Threads
1,136,989
Messages
5,678,975
Members
419,796
Latest member
doctorgresham

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
Top